Skip to main content

Lexicons for Sentiment, Affect, and Connotation

Lexicons for Sentiment, Affect, and Connotation

Understanding the emotional and subjective nuances of language is crucial for many applications, from sentiment analysis to understanding the subtle connotations behind words. Lexicons play a vital role in helping computers interpret and analyze these aspects of language.

What are Sentiment and Affect Lexicons?

At their core, sentiment and affect lexicons are dictionaries or lists of words that have been assigned scores or labels indicating their emotional tone or subjective meaning. These lexicons are instrumental in enabling computers to "understand" the emotional content of text.

Types of Sentiment Lexicons

The simplest sentiment lexicons classify words as either positive or negative. Here are a few well-known examples:

  • General Inquirer: One of the oldest, containing lists of positive and negative words based on content analysis.
  • MPQA Subjectivity Lexicon: Includes positive and negative words, along with labels for reliability (strong or weak subjectivity).
  • Hu and Liu's Polarity Lexicon: A lexicon created from product reviews, with words labeled using a bootstrapping method from WordNet.

Examples of Sentiment Words:

Positive Negative
admire, amazing, assure, celebration, charm, eager abominable, anger, anxious, bad, catastrophe, cheap
enthusiastic, excellent, fancy, fantastic, frolic, graceful complaint, condescending, deceit, defective, disappointment, embarrass

Beyond Simple Sentiment: Valence, Arousal, and Dominance (VAD)

Some lexicons go beyond simple positive/negative classification and assign words values along multiple affective dimensions:

  • Valence: The pleasantness of a word.
  • Arousal: The intensity of the emotion.
  • Dominance: The degree of control associated with the word.

Example of VAD values

Word Valence Arousal Dominance
vacation 0.840 0.962 0.991
torture 0.115 0.046 0.045

Emotion-Specific Lexicons

Other lexicons focus on specific emotions. The NRC Word-Emotion Association Lexicon (EmoLex) is an example of a lexicon utilizing Plutchik’s (1980) 8 basic emotions.

Example from EmoLex

Word anger anticipation disgust fear joy sadness surprise trust positive negative
reward 0 1 0 0 1 0 1 1 1 0
garbage 0 0 1 0 0 0 0 0 0 1

Linguistic Inquiry and Word Count (LIWC)

LIWC is a comprehensive set of lexicons designed for social psychological tasks. It includes categories like:

  • Positive and negative emotion
  • Anger, sadness
  • Cognitive mechanisms
  • Perception
  • Tentative
  • Inhibition

Concrete vs. Abstract Words

It's often helpful to distinguish between concrete words (e.g., "banana," "bathrobe") and abstract words (e.g., "belief," "although"). Lexicons like the one from Brysbaert et al. (2014) provide ratings for the concreteness of words.

Creating Affect Lexicons

There are a few different methods used to create affect lexicons

Human Labeling (Crowdsourcing)

One of the most common methods for building affect lexicons is to have humans label each word, often using crowdsourcing.

When labeling, annotators may be presented with synonym questions to prime the correct sense of the word. Associations are typically rated on a scale (e.g., not, weakly, moderately, strongly associated). Outliers are removed, and the majority class is assigned to each term.

Another approach is called Best-Worst Scaling. Annotators are given a set of words and asked to identify the "best" (highest) and "worst" (lowest) in terms of a specific property (e.g., valence, arousal, dominance). Agreement is evaluated through split-half reliability.

Semi-Supervised Induction of Affect Lexicons

This approach starts with a small set of "seed" words (e.g., "good," "bad") and then expands the lexicon by finding words that are similar to the seed words.

Semantic Axis Methods

One popular method involves computing a "semantic axis." Here's how it works:

  1. Choose seed words: Select positive and negative seed words.
  2. Compute embeddings: Obtain word embeddings for each seed word.
  3. Create pole centroids: Calculate the centroid of the positive and negative seed word embeddings.
  4. Define semantic axis: Subtract the negative centroid from the positive centroid.
  5. Score words: Calculate the cosine similarity between a word's embedding and the semantic axis.

Label Propagation

This method uses graphs to propagate sentiment labels. The steps are as follows:

  1. Define a graph: Build a weighted lexical graph connecting words based on cosine similarity.
  2. Define a seed set: Choose positive and negative seed words.
  3. Propagate polarities: Perform a random walk on the graph, starting at the seed set.
  4. Create word scores: Combine positive and negative scores to create a final polarity score.
  5. Assign confidence: Use bootstrap sampling to estimate the reliability of the scores.

Other Similarity Metrics

Besides embedding cosine, other similarity metrics include:

  • Syntactic cues: Adjectives conjoined by "and" tend to have the same polarity.
  • Morphological negation: Words with prefixes like "un-" or "im-" often have opposite polarity.
  • Thesaurus-based methods: Synonyms share polarity, while antonyms have opposite polarity.

Supervised Learning of Word Sentiment

The web contains an enormous number of online reviews for restaurants, movies, books, or other products, each of which have the text of the review along with an associated review score: a value that may range from 1 star to 5 stars, or scoring 1 to 10.

Log Odds Ratio Informative Dirichlet Prior

In this section we walk through the details of one solution to this problem: the “log odds ratio informative Dirichlet prior” method that is a particularly useful method for finding words that are statistically overrepresented in one particular category of texts compared to another. It’s based on the idea of using another large corpus to get a prior estimate of what we expect the frequency of each word to be.

Using Lexicons for Sentiment and Affect Recognition

Lexicons can be used in a variety of ways to improve sentiment and affect detection.

Rule-Based Classification

When you don't have enough training data for supervised learning, you can use lexicons to create a rule-based classifier. This involves calculating the ratio of positive to negative words in a document and classifying it based on a threshold.

Features in Supervised Classifiers

Lexicon-based counts can also be used as features in supervised classifiers, along with other lexical or non-lexical features.

Conclusion

Lexicons are essential tools for understanding the emotional and subjective aspects of language. Whether they're created by hand, automatically, or through a combination of methods, they provide valuable insights for a wide range of natural language processing applications.

Comments

Popular posts from this blog

Chatbots & Dialogue Systems

Chatbots & Dialogue Systems Understanding Conversations: Key Concepts Have you ever wondered what makes a conversation flow? It's more than just exchanging words; it's a complex dance of understanding, responding, and acknowledging each other. Let's break down some key elements: Turns in Conversation Conversations are structured in turns, where each participant gets a chance to speak. Knowing when to start and stop talking is crucial. For example, if a system is performing the role of speaker, it should know when the user makes a correction. Spoken dialogue systems also need to detect when a user has finished speaking, which is a task called endpoint detection and it can be tricky due to noise or pauses within a turn. The Power of Speech Acts Each utterance in a dialogue is a kind of action. These are commonly referred to as speech acts or dialogue acts . Here are some major classes: Constatives: Statements that commit the speaker to something being the cas...

Automatic Speech Recognition and Text-to-Speech

Automatic Speech Recognition and Text-to-Speech Have you ever wondered how your phone understands your spoken commands, or how your favorite virtual assistant talks back to you? The magic behind these technologies lies in two fascinating fields: Automatic Speech Recognition (ASR) and Text-to-Speech (TTS). Understanding Automatic Speech Recognition (ASR) ASR, also known as speech-to-text, is the process of converting audio waveforms into written text. It's what allows computers to "hear" and understand human speech. The Challenges of ASR Creating an accurate ASR system is no easy feat. Real-world speech is messy and varied, presenting several challenges: Background Noise: Imagine trying to understand someone in a crowded restaurant. ASR systems face similar challenges filtering out ambient sounds. Accents and Dialects: The way we pronounce words differs greatly depending on our background. ASR systems need to be trained on diverse speech patterns. Speaking Spe...

Introduction to the Fascinating World of Machine Learning

Introduction to the Fascinating World of Machine Learning Have you ever wondered how computers can do things that seem almost intelligent? Things like recommending movies you might like, recognizing your face in a photo, or filtering spam from your inbox? The secret behind these abilities is often Machine Learning (ML). What Exactly is Machine Learning? To understand ML, it's helpful to first understand what an algorithm is. Think of an algorithm as a recipe for a computer. It's a set of instructions that tells the computer how to transform some input into a desired output. For example, an algorithm for sorting numbers takes a jumbled list of numbers as input and produces a neatly ordered list as output. But what happens when we don't know the "recipe?" What if we don't have a clear set of instructions for a task? This is where machine learning steps in. Instead of giving the computer explicit instructions, we feed it lots of data and let it learn the rul...