7 Your first sentiment analyzer using sentiment lexicons

 

This chapter covers

  • Discussing sentiment analysis in depth
  • Implementing a sentiment analyzer using a lexicon-based approach
  • Using spaCy to apply linguistic pipeline and linguistic concepts

The last two chapters discussed implementation of an authorship-attribution algorithm using NLP approaches and machine-learning techniques. You can now apply your authorship-attribution application whenever you want to identify the actual author of a particular piece of writing. The previous chapters also introduced several new ideas. Let’s summarize them here before we attempt a new NLP application:

7.1 Use cases

7.2 Understanding your task

7.2.1 Aggregating sentiment score with the help of a lexicon

7.2.2 Learning to detect sentiment in a data-driven way

7.3 Setting up the pipeline: Data loading and analysis

7.3.1 Data loading and preprocessing

7.3.2 A closer look into the data

7.4 Aggregating sentiment scores with a sentiment lexicon

7.4.1 Collecting sentiment scores from a lexicon

7.4.2 Applying sentiment scores to detect review polarity

Summary

Solutions to exercises