data_dictionary_Rauh: Rauh's German Political Sentiment Dictionary

data_dictionary_RauhR Documentation

Rauh's German Political Sentiment Dictionary

Description

A quanteda dictionary object containing the dictionaries provided in Rauh (forthcoming). Rauh assesses its performance against human intuition of sentiment in German political language (parliamentary speeches, party manifestos, and media coverage). The resource builds on, harmonizes and extends the SentiWS (Remus et al. 2010) and GermanPolarityClues (Waltinger 2010) dictionaries. In order to use the negation correction provided by the dictionary, currently a combination of tokens_replace and tokens_compound is required to harmonize the five covered bi-gram patterns prior to scoring. The example below shows how to conduct this transformation. Note that the process changes the terms "nicht|nichts|kein|keine|keinen" to a joint term altering some of the features of the original corpus.

Usage

data_dictionary_Rauh

Format

The dictionary has four keys.

negative

19,750 terms indicating negative sentiment

positive

17,330 terms indicating positive sentiment

neg_positive

17,330 terms indicating a positive word preceded by a negation (used to convey negative sentiment)

neg_negative

19,750 terms indicating a negative word preceded by a negation (used to convey positive sentiment)

Source

\Sexpr[results=rd]{tools:::Rd_expr_doi("10.7910/DVN/BKBXWD")}

References

Rauh, C. (2018). Validating a Sentiment Dictionary for German Political Language: A Workbench Note. Journal of Information Technology & Politics, 15(4), 319–343. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/19331681.2018.1485608")}

Remus, R., Quasthoff U., & Heyer, G. (2010). "SentiWS - a Publicly Available German-language Resource for Sentiment Analysis." In Proceedings of the 7th International Language Resources and Evaluation (LREC'10), 1168–1171.

Waltinger, U. (2010). "GermanPolarityClues: A Lexical Resource for German Sentiment Analysis." In International Conference on Language Resources and Evaluation, 17–23 May 2010 LREC'10.

Examples


# tokenize example text
toks <- tokens("nicht schlecht dieses wunderschöne Wörterbuch")
# replace negation markers with "not"
toks1 <- tokens_replace(toks, pattern = c("nicht", "nichts", "kein",
                                                    "keine", "keinen"),
                                  replacement = rep("not", 5))
# compound bi-gram negation patterns
toks2 <- tokens_compound(toks1, data_dictionary_Rauh, concatenator = " ")

# apply dictionary
tokens_lookup(toks2, dictionary = data_dictionary_Rauh) |>
  dfm()


quanteda/quanteda.sentiment documentation built on Feb. 26, 2024, 12:42 a.m.