limpiar_stopwords: Clean stop words for visualisations

View source: R/limpiar_stopwords.R

limpiar_stopwordsR Documentation

Clean stop words for visualisations

Description

The two lists - sentiment & topics, are very similar, in that most words are in both lists. However, sentiment analysis is sensitive to negation, so negation cues e.g. "no", "nada" etc. are not removed by the sentiment list. For most purposes, topics are the go-to lists, but care is always advised when removing stop words.

Usage

limpiar_stopwords(df, text_var = mention_content, stop_words)

Arguments

df

Name of Data Frame or Tibble object

text_var

name of the text variable

stop_words

"sentiment" or "topics" - sentiment retains negation cues

Details

stop word list is editable via data("sentiment_stops") or data("topic_stops").

Value

the text variable with stop words from specified list removed

Examples

limpiar_examples %>% dplyr::select(mention_content)

limpiar_examples %>% limpiar_stopwords(stop_words = "topics") %>%
dplyr::select(mention_content) %>% limpiar_spaces()


jpcompartir/LimpiaR documentation built on April 6, 2024, 5:22 a.m.