Advanced Computing Techniques: Implementation, Informatics and Emerging Technologies

Document Sentiment Analysis using Python

Author(s): Manavi Nair*, Sonia Saini, Ruchika Bathla and Ritu Punhani

Pp: 70-90 (21)

Doi: 10.2174/9789814998451121010010

* (Excluding Mailing and Handling)


Sentiment Analysis is a part of artificial intelligence that uses natural language processing (NLP) to analyze the raw data and further extract the user's sentiment. The sentiment analysis can be achieved at three levels: at the document level, sentence level, and aspect level. In this chapter, we will be covering Document Sentiment Analysis, in which we analyze the contents of the document. This chapter gives a practical overview of the field of document sentiment analysis using the rulebased method. The main idea is to show the working of document sentiment analysis. The analysis can be done using the python language. Python language is a high-level language that is used in artificial intelligence and various related fields. Two different libraries have been used to do the analysis. The NLTK library is a free and open-source library used for tokenization, stop words, and lemmatization whereas, the spacy library is used for its displacy visualizer module, which shows the illustrations of the sentences and named entity recognition, highlighting the entities present in the document. The experiment is conducted using the pre-processing methods, and a conclusion is derived with the aid of the result.

Keywords: Dependency parser, Document sentiment analysis, Named entity recognition, Opinion mining, Rule-based method, Sentiment analysis, Tokenization.

Related Journals
Related Books
© 2022 Bentham Science Publishers | Privacy Policy