The 2015 Lexicoder Sentiment Dictionary in quanteda dictionary format.

data_dictionary_LSD2015

Format

A dictionary of four keys containing glob-style pattern matches.

negative

2,858 word patterns indicating negative sentiment

positive

1,709 word patterns indicating positive sentiment

neg_positive

1,721 word patterns indicating a positive word preceded by a negation (used to convey negative sentiment)

negative

2,860 word patterns indicating a negative word preceded by a negation (used to convey positive sentiment)

Details

The dictionary consists of 2,858 "negative" sentiment words and 1,709 "positive" sentiment words. A further set of 2,860 and 1,721 negations of negative and positive words, respectively, is also included. While many users will find the non-negation sentiment forms of the LSD adequate for sentiment analysis, Young and Soroka (2012) did find a small, but non-negligible increase in performance when accounting for negations. Users wishing to test this or include the negations are encouraged to subtract negated positive words from the count of positive words, and subtract the negated negative words from the negative count.

Young and Soroka (2012) also suggest the use of a pre-processing script to remove specific cases of some words (i.e., "good bye", or "nobody better", which should not be counted as positive). Pre-processing scripts are available at http://lexicoder.com.

License and Conditions

The LSD is available for non-commercial academic purposes only. By using data_dictionary_LSD2015, you accept these terms.

Please cite the references below when using the dictionary.

References

The objectives, development and reliability of the dictionary are discussed in detail in Young and Soroka (2012). Please cite this article when using the Lexicoder Sentiment Dictionary and related resources. Young, Lori and Stuart Soroka. 2012. Lexicoder Sentiment Dictionary. Available at http://lexicoder.com.

Young, Lori and Stuart Soroka. 2012. "Affective News: The Automated Coding of Sentiment in Political Texts." Political Communication 29(2): 205-231.

Examples

# simple example txt <- "This aggressive policy will not win friends." tokens_lookup(tokens(txt), dictionary = data_dictionary_LSD2015, exclusive = FALSE)
#> tokens from 1 document. #> text1 : #> [1] "This" "NEGATIVE" "policy" "will" "NEG_POSITIVE" #> [6] "POSITIVE" "POSITIVE" "." #>
## tokens from 1 document. ## text1 : ## [1] "This" "NEGATIVE" "policy" "will" "NEG_POSITIVE" "POSITIVE" "." # on larger examples - notice that few negations are used dfm(data_char_ukimmig2010, dictionary = data_dictionary_LSD2015)
#> Document-feature matrix of: 9 documents, 4 features (47.2% sparse). #> 9 x 4 sparse Matrix of class "dfm" #> features #> docs negative positive neg_positive neg_negative #> BNP 146 107 0 0 #> Coalition 6 15 0 0 #> Conservative 11 31 0 0 #> Greens 23 37 2 0 #> Labour 14 31 0 0 #> LibDem 22 26 0 0 #> PC 9 8 0 0 #> SNP 4 13 0 0 #> UKIP 18 29 0 0
kwic(data_char_ukimmig2010, "not")
#> #> [BNP, 434] resident population of Britain was | not | #> [BNP, 480] in England and Wales were | not | #> [BNP, 523] 2005 birth rate figure does | not | #> [BNP, 690] ' new immigrants' are | not | #> [BNP, 979] fractured society. We do | not | #> [BNP, 1431] racially motivated crime, and | not | #> [BNP, 1787] to ensure that we do | not | #> [BNP, 2020] aspect of national security, | not | #> [BNP, 3182] in other words, are | not | #> [Conservative, 54] be reduced. We do | not | #> [Conservative, 101] of thousands a year, | not | #> [Conservative, 313] foreign students or existing institutions | not | #> [Greens, 67] thousand years. It is | not | #> [Greens, 384] be a positive choice, | not | #> [Greens, 465] manifesto.- We should | not | #> [Greens, 479] people whose immigration status is | not | #> [Greens, 537] provided for people who have | not | #> [Greens, 626] who have been trafficked should | not | #> [Greens, 661] - Those seeking sanctuary should | not | #> [Labour, 61] of employment and wages, | not | #> [Labour, 151] rising employment and wages, | not | #> [Labour, 427] of employment and wages, | not | #> [Labour, 575] Britain is a privilege and | not | #> [LibDem, 277] This route to citizenship will | not | #> [LibDem, 469] individuals for whom removal is | not | #> [UKIP, 124] ensuring any future immigration does | not | #> [UKIP, 367] deportation. Such citizens will | not | #> [UKIP, 386] have completed a period of | not | #> [UKIP, 626] future the British courts will | not | #> [UKIP, 689] admitting officer that marriage, | not | #> #> born in this country( #> " white British"( #> include births to second and #> from Eastern Europe, as #> share the Orwellian knee-jerk response #> the perpetrators, as often #> become a dispossessed minority in #> merely an issue of social #> products of' false consciousness #> need to attract people to #> hundreds of thousands. To #> registered with Companies house. #> just a matter of immigration #> the outcome of desperation. #> tolerate the long-term presence of #> defined. Such immigrants are #> succeeded in their claim for #> be subject to summary deportation #> be detained, and in #> rising immigration, and requiring #> rising immigration- but we #> rising immigration. We recognise #> a right, we will #> apply to people arriving after #> possible or imminent, except #> exceed 50,000 people p.a. #> be eligible for benefits. #> less then five years as #> be allowed to appeal to #> residence, is their primary