Skip to content

lex.SocialSent

lex.SocialSent

SocialSent(year: SocialSentYear) -> Lexicon

A set of English sentiment lexicons constructed for each decade from 1850 to 2000.

Each lexicon represents the inferred sentiment of the top 5,000 non-stop words from the Corpus of Historical American English.

Example
import wordlevel as wl

social_sent = wl.lex.SocialSent("2000")
Note

The first call for a given year downloads that lexicon from HuggingFace and caches it. By default, later calls for the same lexicon read the cached copy without contacting HuggingFace. To load the latest or a specific version instead, see LexiconLoader.

License

This data is made available under the Public Domain Dedication and License v1.0.

Citation

If you use this lexicon, please cite the following paper.

Hamilton, W. L., Clark, K., Leskovec, J., & Jurafsky, D. (2016). Inducing domain-specific sentiment lexicons from unlabeled corpora. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing (pp. 595-605).

Parameters:

Name Type Description Default

year

SocialSentYear

The year of the lexicon

required

Raises:

Type Description
LexiconDownloadError

If the lexicon could not be downloaded from HuggingFace

Source