Jennifer Isasi, Maria José Afanador-Llach, Riva Quiroga, Adam Crymble, Rolando Rodriguez, Shuang Du, Andrew Janco
Topics (keywords)
DH, Open Education, Open Access, data visualisation, distant reading, R
Learning outcomes
After completing this lesson, you will be able to:
Develop appropriate research questions that apply sentiment analysis to literary or narrative texts
Use the R programming language, RStudio, and the syuzhet package with the NRC Word-Emotion Association Lexicon to generate sentiment scores for words in texts of various languages
Critically interpret the results of your sentiment analysis
Visualise the results through a range of graphs (bar, word cloud) to aid interpretation
Abstract
This lesson introduces you to the syuzhet sentiment analysis algorithm using the R programming language, and applies it to a single narrative text to demonstrate its research potential. The syuzhet package considers sentiment analysis in a time-series-friendly manner, allowing you to explore the developing sentiment in a text across the pages.
To make the lesson useful for scholars working with non-English texts, this tutorial uses a Spanish-language novel, Miau (1888) as its case study. This allows you to learn the steps necessary to work with everything from accented characters to thinking through the intellectual problems of applying English language algorithms to non-English texts. You do not need to know Spanish to follow the lesson (though you will if you want to read the original novel).
Title of the resource
Sentiment Analysis with 'syuzhet' using R
Resource type
External Resource
Authors, editors and contributors
Jennifer Isasi, Maria José Afanador-Llach, Riva Quiroga, Adam Crymble, Rolando Rodriguez, Shuang Du, Andrew Janco
Topics (keywords)
DH, Open Education, Open Access, data visualisation, distant reading, R
Learning outcomes
After completing this lesson, you will be able to:
Abstract
This lesson introduces you to the syuzhet sentiment analysis algorithm using the R programming language, and applies it to a single narrative text to demonstrate its research potential. The syuzhet package considers sentiment analysis in a time-series-friendly manner, allowing you to explore the developing sentiment in a text across the pages.
To make the lesson useful for scholars working with non-English texts, this tutorial uses a Spanish-language novel, Miau (1888) as its case study. This allows you to learn the steps necessary to work with everything from accented characters to thinking through the intellectual problems of applying English language algorithms to non-English texts. You do not need to know Spanish to follow the lesson (though you will if you want to read the original novel).