textdata (version 0.1.0)

lexicon_afinn: AFINN-111 dataset

Description

AFINN is a lexicon of English words rated for valence with an integer between minus five (negative) and plus five (positive). The words have been manually labeled by Finn <U+00C5>rup Nielsen in 2009-2011.

Usage

lexicon_afinn(dir = NULL, delete = FALSE, return_path = FALSE)

Arguments

dir

Character, path to directory where data will be stored. If NULL, user_cache_dir will be used to determine path.

delete

Logical, set TRUE to delete dataset.

return_path

Logical, set TRUE to return the path of the dataset.

Value

A tibble with 2,477 rows and 2 variables:

word

An English word

sentiment

Indicator for sentiment: integer between -5 and +5

Details

This dataset is the newest version with 2477 words and phrases.

Citation info:

This dataset was published in Finn <U+00C4>rup Nielsen (2011), ``A new ANEW: Evaluation of a word list for sentiment analysis in microblogs'', Proceedings of the ESWC2011 Workshop on 'Making Sense of Microposts': Big things come in small packages (2011) 93-98.

article{nielsen11, author = {Finn <U+00C4>ruprup Nielsen}, title = {A new ANEW: Evaluation of a word list for sentiment analysis in microblogs}, journal = {CoRR}, volume = {abs/1103.2903}, year = {2011}, url = {http://arxiv.org/abs/1103.2903}, archivePrefix = {arXiv}, eprint = {1103.2903}, biburl = {https://dblp.org/rec/bib/journals/corr/abs-1103-2903}, bibsource = {dblp computer science bibliography, https://dblp.org} }

Examples

Run this code
# NOT RUN {
lexicon_afinn()

# Custom directory
lexicon_afinn(dir = "data/")

# Deleting dataset
lexicon_afinn(delete = TRUE)

# Returning filepath of data
lexicon_afinn(return_path = TRUE)
# }

Run the code above in your browser using DataLab