- Introduced by
- George K. Zipf (frequency-distribution foundation)
- Year
- 1949
- Type
- Descriptive text-mining analysis
What does it do?
Text frequency analysis is a descriptive text-mining method that counts how often words, n-grams, and phrases occur in a corpus in order to surface its dominant vocabulary and themes.
It draws on the empirical regularity in word frequencies described by George K. Zipf (1949): a few terms occur very often while most occur rarely. It is one of the simplest entry points into quantitative text analysis.
The intuition behind the method
The words that recur in a body of text usually indicate what it is about. Text frequency analysis makes this explicit and repeatable. Instead of skimming, you tally every token, every adjacent word sequence (bigram or trigram), and every recurring phrase, then rank the results by count. The resulting frequency table shows which terms dominate the corpus, and anyone who repeats the same counting steps on the same text gets the same table.
History
Text frequency analysis builds on the rank-frequency pattern in word counts that George K. Zipf (1949), in Human Behavior and the Principle of Least Effort, brought to wide attention: a few words are very frequent and most are rare. Zipf's book is the usual reference for this regularity, but counting word frequencies is much older than that work, so it is more accurate to say that Zipf popularised the pattern than that he originated frequency counting. Manning and Schütze (1999), in Foundations of Statistical Natural Language Processing, treat word and n-gram frequency counting as part of statistical NLP, and later methods such as TF-IDF and topic modelling build on counts of this kind.
When to use it
Choose text frequency analysis when you have a collection of text and want a descriptive first view of its vocabulary, recurring n-grams, or phrases, for example to explore what respondents or documents repeatedly mention. Preprocessing decisions (tokenisation, stop-word removal, lemmatisation) should be made and documented before counting. Do not use it when your question concerns meaning, context, stance, or sentiment, since raw counts do not capture these. It is less reliable with very small or narrow collections: a ranking built from a few documents mostly reflects those documents, so check that the top of the ranking is stable on your own data, for example by comparing rankings computed on random halves of the corpus.
Limitations and considerations
- Counts record surface forms only. The method cannot tell whether a frequent term is used affirmatively, negatively, or as a technical label.
- Results depend on preprocessing choices. Changing the stop-word list or lemmatisation rule changes which terms rank highest.
- Raw counts favour longer documents and larger corpora. Without normalisation, frequencies are not directly comparable across corpora of different sizes.
- The rare-word tail is large in most corpora, so the ranked list is informative mainly at the top; the lower ranks contribute little frequency signal.
- The counts rest on assumptions that the method does not test: that the corpus is representative of the population of interest, that documents are independent of one another (repeated text from the same author or source inflates counts), and that the tokenisation rule and the definition of a phrase are fixed and reported, since these determine what is counted.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The procedure is simple: tokenise, count, rank. Each step can be inspected, and the same settings applied to the same text reproduce the same table.
- It needs no labelled training data, so it can be run on raw text immediately.
- It works at the level of single words, n-grams, and phrases, so the same procedure can compare different units of meaning.
Applications
- Listing the most frequent terms and phrases in open-ended survey responses to see what respondents repeatedly raise.
- Examining recurring bigrams and trigrams in interview transcripts to identify phrasing that recurs across speakers.
- Comparing ranked term lists between document groups, after normalising for corpus length, to see which vocabulary is more prominent in one group; treat the difference as descriptive until it has been tested on the counts.
- Producing a descriptive vocabulary profile of a corpus before applying weighted methods such as TF-IDF or topic models.
How it works
How it works
Before counting, the raw text is tokenised into words, and stop-words (high-frequency function words such as 'the' or 'and') are usually removed. Tokens are often lemmatised to a common base form, so that inflected variants are counted together. These choices change the counts directly: a different stop-word list or lemmatisation rule produces a different ranking, so they should be reported with the results.
Each unit of interest is tallied across the corpus. Single tokens are counted for word frequency, adjacent token sequences are counted for n-gram frequency, and recurring multi-word expressions are counted as phrases. The output of this stage is a raw count c(t) for each distinct term t. To compare corpora of different lengths, the corpus length N is also recorded as the total number of tokens after preprocessing, and the relative frequency f(t) = c(t) / N is computed. N must be counted after the same preprocessing has been applied to every corpus, otherwise the relative frequencies are not comparable. Relative frequencies may be multiplied by a fixed constant for readability.
The counted terms are ordered from most to least frequent, usually as a most-common list. In most natural-language corpora this ranked list shows a short head of very frequent terms and a long tail of rare ones; Zipf's law describes this pattern, and the tail is where most distinct terms fall.
The ranked frequencies are read for content patterns and dominant themes. Corpus size and language diversity affect how stable the counts are, and raw counts are not comparable across corpora of different lengths unless they are normalised to relative frequencies as described above. Interpretation should avoid drawing conclusions from single counts in the rare-word tail. Differences in relative frequency between two groups are descriptive: they show what is more prominent in the counts, not that the difference is meaningful. If the claim is that one group emphasises a term more, test it on the counts, for example with a chi-square test or a log-likelihood comparison of term counts between the groups, and exclude or flag terms with very low counts, for which such tests are unreliable. The stability of the ranking can be checked by recomputing it on random subsets of the documents.
Common pitfalls
- Skipping stop-word removal lets function words such as 'the' or 'of' fill the top of the table and hide the content words that matter.
- Using a corpus that is too small or too narrow gives unstable rankings that may reflect a few documents rather than the population of interest.
- Reading meaning into the rare-word tail: a term that occurs once or twice is easily mistaken for a theme, when it is more often noise or an idiosyncratic usage.
- Comparing raw counts between corpora of different sizes without normalising by corpus length leads to misleading conclusions about which corpus emphasises a term more.
Frequently asked questions
What does text frequency analysis actually count?
It counts how often individual words, adjacent word sequences (n-grams such as bigrams and trigrams), and recurring phrases appear across a corpus, then ranks them. The output is a frequency table that shows which terms are most common.
Why do I need to preprocess the text first?
Without tokenisation, stop-word removal, and lemmatisation, high-frequency function words and inflected variants of the same word dominate the counts and hide the content. The preprocessing choices also determine the ranking, so they should be documented.
What is Zipf's law and why does it matter here?
Zipf's law describes an empirical pattern in which a small number of words occur very frequently while most occur rarely, producing a long tail. It describes the shape of the ranked frequency list; it does not by itself tell you what the frequent words mean, and it is a reason to be cautious when reading the rare-word tail.
How much text do I need?
There is no fixed minimum that guarantees reliable frequencies. Very small or narrow collections produce rankings that may reflect a handful of documents, and corpus size and language diversity both affect how stable the counts are. Larger and more representative corpora give more stable counts, and the stability of the top of the ranking can be checked on your own data, for example by comparing rankings across random subsets of documents.
Related methods
Sources
Zipf, G. K. (1949). Human Behavior and the Principle of Least Effort. Addison-Wesley.
Open publication referenceManning, C. D. & Schütze, H. (1999). Foundations of Statistical Natural Language Processing. MIT Press.
ISBN: 9780262133609