- Introduced by
- Lexicon tradition (Pennebaker LIWC; General Inquirer)
- Year
- 2003
- Type
- Word-count text measurement against predefined category dictionaries
- Family
- Text-as-data methods
What does it do?
Dictionary-based text analysis measures concepts in text by counting how often words belonging to predefined category lists — dictionaries — appear in each document.
It is the workhorse lexicon method behind tools like LIWC and the General Inquirer, prized for its transparency and scalability: a category score is simply the share of a document's words that match the category's word list.
The intuition behind the method
If you want to know how anxious, positive, or moralistic a text is, one simple idea is to keep a list of words that signal each concept and count them. A speech full of words like 'worried,' 'afraid,' and 'nervous' scores high on anxiety; one full of 'should,' 'wrong,' and 'duty' scores high on morality. Dictionary analysis formalizes this: pick or build a validated word list per category, count matches per document, and normalize by length so long and short texts are comparable. Its great virtue is that anyone can see exactly why a document got its score — the method is fully transparent — but that same literalness is its weakness, since it ignores context, negation, and sarcasm.
History
Dictionary methods are among the oldest computational text-analysis tools, and the lexicon tradition includes the General Inquirer. Pennebaker and colleagues' Linguistic Inquiry and Word Count (LIWC) made psychologically grounded dictionaries widely used across the social sciences. The Annual Review synthesis by Pennebaker, Mehl, and Niederhoffer reviews several text analysis programs and summarizes evidence linking natural word use to personality, social and situational fluctuations, and psychological interventions, with particular attention to function words (particles) as markers of emotional state, social identity, and cognitive style. Sentiment lexicons and the Moral Foundations Dictionary later extended the approach to other constructs. Grimmer and Stewart's text-as-data review argues that automated text methods are no substitute for careful thought and close reading and require extensive, problem-specific validation.
When to use it
Use dictionary-based text analysis when you need a transparent, reproducible, and fast measure of well-defined lexical categories — emotion, sentiment, moral language, cognitive style — across many documents, and when a validated dictionary exists for your construct and domain. It is excellent for descriptive trends, replication, and as a baseline against more complex models. It assumes that the target concept is reliably signaled by individual words and that a dictionary validated in one domain transfers to yours. It is less appropriate when meaning depends heavily on context, syntax, negation, or sarcasm, when the construct is not lexically transparent, or when domain-specific word senses diverge from the dictionary's — situations better served by supervised classifiers or contextual embedding models, ideally validated against human coding.
Limitations and considerations
- Bag-of-words counting ignores context, syntax, negation, and sarcasm, misclassifying meaning.
- Dictionaries validated in one domain or era may transfer poorly to another (e.g., social media slang).
- Coverage is limited to listed words, missing synonyms, neologisms, and implicit expression.
- Polysemy means the same word can signal different categories depending on context the method cannot see.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Fully transparent and reproducible: every score traces directly to counted words.
- Fast and scalable to very large corpora with negligible computational cost.
- No training data required when a validated dictionary exists, lowering the barrier to entry.
- Comparable across studies and over time when the same dictionary is used, aiding cumulative research.
Applications
- Measuring emotional tone and sentiment in news, speeches, and social media.
- Tracking moral-foundations language in political and advocacy communication.
- Quantifying psychological and cognitive style in text with LIWC categories.
- Providing a fast, transparent baseline against which supervised classifiers are compared.
- Studying longitudinal trends in language using consistent dictionaries over time.
How it works
How it works
The analyst chooses a validated dictionary (e.g., LIWC's psychological categories, the Moral Foundations Dictionary, or a sentiment lexicon) or constructs and validates a custom one whose word lists operationalize the target categories.
Documents are tokenized and normalized (for example, lower-cased), and each token is checked against the word lists of the chosen categories. How wildcards, stems, and words that appear in more than one category are handled must follow the documented rules of the dictionary in use, and these rules should be reported.
The category score S_ic counts each token w in document d_i that appears in the dictionary D_c for category c, so each match contributes 1. This total is divided by n_i, the number of tokens in document i, which turns the count into a proportion. The division makes scores comparable across texts of different lengths.
Formula
S_{ic} = \frac{1}{n_i}\sum_{w \in d_i} \mathbb{1}[w \in D_c]Scores are validated against human judgment or external criteria and interpreted cautiously, recognizing that word counts capture surface lexical signals and can be distorted by context, negation, irony, and domain-specific word meanings.
Common pitfalls
- Applying a general-purpose dictionary to a specialized domain without checking word-sense validity.
- Ignoring negation, so 'not happy' counts as positive.
- Reporting raw counts instead of length-normalized proportions, conflating verbosity with category prevalence.
- Treating dictionary scores as ground truth without validating against human-coded samples.
Frequently asked questions
How does dictionary analysis differ from supervised machine learning?
A dictionary is fixed in advance: it counts words from human-curated lists, so its decisions are fully transparent and need no training data. A supervised classifier learns patterns from human-labeled examples and can capture context and word combinations a dictionary misses, but it requires labeled data and is harder to interpret. Dictionaries trade accuracy and contextual sensitivity for transparency, reproducibility, and speed, which is why they remain a popular baseline even as classifiers improve.
Why can a validated dictionary still give wrong results in my corpus?
Validation is domain- and era-specific. A sentiment or emotion dictionary validated on essays or news may misfire on social-media text full of slang, irony, and domain-specific word senses, and it cannot handle negation or sarcasm. The same word can signal different things in different contexts (polysemy). Always check a dictionary's performance against a human-coded sample from your own corpus before trusting its scores, and consider domain adaptation.
Should I normalize dictionary scores by document length?
Almost always yes. Raw counts confound how much of a category appears with how long the document is, so a long neutral document can accumulate more category words than a short emotional one. Dividing by the number of words yields a proportion that is comparable across documents of different lengths, which is what tools like LIWC report. Without normalization, you risk measuring verbosity rather than the construct.
Related methods
Sources
Pennebaker, J. W., Mehl, M. R., & Niederhoffer, K. G. (2003). Psychological aspects of natural language use: Our words, our selves. Annual Review of Psychology, 54, 547–577.
Open DOI referenceGrimmer, J., & Stewart, B. M. (2013). Text as data: The promise and pitfalls of automatic content analysis methods for political texts. Political Analysis, 21(3), 267–297.
Open DOI reference