Sentiment analysis is a sub-discipline in the field of natural language processing and computational linguistics and can be used for automated or semi-automated analyses of text documents. One of the aims of these analyses is to recognize an expressed attitude as positive or negative as it can be contained in comments on social media platforms or political documents and speeches as well as fictional and nonfictional texts. Regarding analyses of comments on social media platforms, this is an extension of the previous tutorial on semi-automated screenings of social media network data. A longitudinal perspective regarding social media comments as well as cross-sectional perspectives regarding fictional and nonfictional texts, e.g. entire books and libraries, can lead to extensive text documents. Their analyses can be simplified and accelerated by using sentiment analysis with acceptable inter-rater reliability. Therefore, this tutorial introduces the basic functions for performing a sentiment analysis with R and explains how text documents can be analysed step by step - regardless of their underlying formatting. All prerequisites and steps are described in detail and associated codes are available on GitHub. A comparison of two political speeches illustrates a possible use case.
翻译:感官分析是自然语言处理和计算语言领域的一项次级纪律,可用于对文本文件进行自动化或半自动分析,这些分析的目的之一是承认一种明确的态度是正面或负面的,因为它可以包含在对社交媒体平台或政治文件和演讲以及虚构和非虚构文本的评论中。关于对社交媒体平台的评论的分析,这是以前关于半自动筛选社交媒体网络数据的指导性的延伸。关于社交媒体评论的纵向观点以及关于虚构和非虚构和非虚构文本的跨部门观点,例如整个书籍和图书馆,可以导致广泛的文本文件。通过使用可接受的跨版可靠性的情绪分析,可以简化和加速这些分析。因此,这一指导性介绍了与R进行情绪分析的基本功能,并解释如何一步一步地分析文本文件,而不论其基本格式如何。所有先决条件和步骤都作了详细描述,GitHub提供了相关的代码。对两种政治演讲的比较说明了可能的用途。