data_dictionary_Rauh: Rauh's German Political Sentiment Dictionary

Description Usage Format Source References Examples

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

1

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

https://doi.org/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.

Remus, R., Quasthoff U., & Heyer, G. (2010). "SentiWS - a Publicly Available German-language Resource for Sentiment Analysis." In Proceedings of the 7th International Language Ressources 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# tokenize example text
toks <- quanteda::tokens("nicht schlecht dieses wunderschöne Wörterbuch")
# replace negation markers with "not"
toks1 <- quanteda::tokens_replace(toks, pattern = c("nicht", "nichts", "kein",
                                                    "keine", "keinen"),
                                  replacement = rep("not", 5))
# compound bi-gram negation patterns
toks2 <- quanteda::tokens_compound(toks1, data_dictionary_Rauh, concatenator = " ")

# apply dictionary
quanteda::dfm(toks2, dictionary = data_dictionary_Rauh)

kbenoit/quanteda.dictionaries documentation built on May 30, 2019, 11:40 p.m.