trinker/lexicon

f-word in valence shifters table?

trinker opened this issue · 3 comments

Currently:

> lexicon::hash_valence_shifters['fucking']
         x    y
1: fucking <NA>
> lexicon::hash_sentiment_jockers_rinker['fuckin']
        x  y
1: fuckin NA
> lexicon::hash_sentiment_jockers_rinker['fucking']
         x  y
1: fucking -1
> lexicon::hash_sentiment_jockers_rinker['fuckin']
        x  y
1: fuckin NA

No placment of fuckin and is fucking in the wrong table? Test empirically.

If this turns out credit to Bryan Goodrich

Use sentimentr::profanity to locate and assess the use of profanity in text. Looking at various data sources in sentimentr.

if (!require("pacman")) install.packages("pacman")
pacman::p_load(sentimentr, tidyverse, magrittr)

dat <- combine_data() %>%
    mutate(id = seq_along(source)) %>%
    as_tibble()

profanities <- dat %$%
   # get_sentences() %$%
    sentimentr::profanity(text, profanity_list = c('fucking'))

profanities[profanity > 0,]

unique(dat[profanities[profanity > 0,]$element_id,]$text)