Abstract
This chapter describes how to perform sentiment analysis using the syuzhet package developed by Jockers. Readers will learn how to extract sentiment values from a text and compare and visualize the emotional arcs of two novels.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
You can watch the lecture on YouTube: https://www.youtube.com/watch?v=oP3c1h8 v2ZQ.
- 2.
In this chapter we explore a lexicon-based approach to sentiment analysis. There are other, more sophisticated, methods for performing sentiment analysis. These other methods employ machine learning algorithms. See, for example, Socher et al. (2013).
- 3.
The word syuzhet comes from the Russian formalist Vladimir Propp who divided narrative into the fabula and the syuzhet. The fabula are the specific elements of a plot, whereas the syuzhet is the manner in which those elements are organized in the linear movement of the narrative.
- 4.
- 5.
That the novels have different lengths will be important to remember when we explore plotting them on the same graph.
- 6.
The get_sentences function implements a sentence splitting function from the textshape package.
- 7.
The syuzhet dictionary was developed in the Nebraska Literary Lab where it was tuned specifically for fiction. The words and values in the default dictionary were extracted from a collection of 165,000 human coded sentences taken from a small corpus of contemporary novels.
- 8.
In this chapter we have only scratched the surface of the features available in the syuzhet package. If you would like to learn more about syuzhet’s capabilities, enter browseVignettes( "syuzhet") in the console and then click the link for the HTML version.
References
Jockers ML (2015b) Syuzhet: Extract sentiment and plot arcs from text. URL https://github.com/mjockers/syuzhet
Socher R, Perelygin A, Wu J, Chuang J, Manning CD, Ng A, Potts C (2013) Recursive deep models for semantic compositionality over a sentiment treebank. URL https://www.aclweb.org/anthology/D13-1170
Jockers M (2015a) That Sentimental Feeling Matthew L. Jockers. URL http://www.matthewjockers.net/2015/12/20/that-sentimental-feeling/
Jockers M (2016) More syuzhet validation Matthew L. Jockers. URL http://www.matthewjockers.net/2016/08/11/more-syuzhet-validation/
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this chapter
Cite this chapter
L. Jockers, M., Thalken, R. (2020). Sentiment Analysis. In: Text Analysis with R. Quantitative Methods in the Humanities and Social Sciences. Springer, Cham. https://doi.org/10.1007/978-3-030-39643-5_14
Download citation
DOI: https://doi.org/10.1007/978-3-030-39643-5_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-39642-8
Online ISBN: 978-3-030-39643-5
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)