Aggiungere stop word personalizzate
Abbiamo visto diverse parole in twitter_data che non sono informative e andrebbero rimosse dall’elenco finale. In questo esercizio aggiungerai alcune parole al tuo data frame custom_stop_words.
Questo esercizio fa parte del corso
Introduzione all'analisi del testo in R
Istruzioni dell'esercizio
- I nomi delle colonne per il nuovo data frame di stop word personalizzate devono corrispondere a
stop_words. - Aggiungi
http,winet.cocome stop word personalizzate. - Esegui il row bind delle stop word personalizzate con
stop_words.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
custom_stop_words <- tribble(
# Column names should match stop_words
___, ___,
# Add http, win, and t.co as custom stop words
___, "CUSTOM",
___, "CUSTOM",
___, "CUSTOM"
)
# Bind the custom stop words to stop_words
stop_words2 <- stop_words %>%
___(___)