- Type
- Text quantification / lexical richness measurement
What does it do?
Lexical diversity analysis quantifies how varied the vocabulary of a text is, using measures such as the type-token ratio (TTR), MTLD, vocd-D, HD-D and Yule's K. McCarthy and Jarvis (2010) carried out a validation study of the more sophisticated MTLD, vocd-D and HD-D approaches, which are designed to be less sensitive to text length than raw TTR.
Tweedie and Baayen (1998) had earlier examined the stability of lexical-richness measures.
The intuition behind the method
If you count how many distinct words a text uses against how many words it contains in total, you get a sense of its vocabulary richness: a text that keeps repeating the same few words is less diverse than one that reaches for many different words. The catch is that this simple ratio shrinks as a text gets longer, so the method uses length-robust measures and equalises text lengths before comparing one text against another.
History
Vocabulary-richness measurement is used in stylometry and corpus linguistics. Tweedie and Baayen (1998) examined the stability of lexical-richness measures. McCarthy and Jarvis (2010) then carried out a validation study of the more sophisticated MTLD, vocd-D and HD-D approaches, which are designed to be less sensitive to text length than raw ratios.
When to use it
Choose lexical diversity when you have tokenised text and want to describe or compare the richness of its vocabulary, for example across authors, documents or groups. It suits descriptive and comparative questions about word choice. Do not use it when the texts cannot be tokenised consistently, or when they cannot be placed on equal length footing and matched for language and genre (for example, a short snippet set against a full novel), because the scores would then mostly reflect length or language rather than vocabulary. The measures also do not capture meaning, sentiment or topic, so a text can score high on diversity and still say little. A formal minimum of about ten tokens is only a lower bound and not a guide to how much text is adequate; see the FAQ.
Limitations and considerations
- Raw TTR depends on text length, so it cannot be compared directly across texts of different sizes.
- Even the length-robust measures do not remove the need for equal-length comparison; standard-sized snippets or rarefaction are still needed for a fair comparison.
- Language and genre shift diversity scores, so uncontrolled comparisons can confound vocabulary richness with stylistic factors.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Summarises a text's vocabulary richness as one number per measure, and TTR, MTLD, vocd-D, HD-D and Yule's K offer different views of the same vocabulary.
- MTLD, vocd-D and HD-D are designed to be less sensitive to text length than raw TTR, and McCarthy and Jarvis (2010) assessed these approaches in a validation study.
- The input is simply tokenised text, so the workflow is short: tokenise, compute the measures, then compare once lengths are matched.
Applications
- Profiling an author's vocabulary richness in stylometric and authorship studies.
- Comparing lexical diversity across writers, documents or genres in humanities research, with texts length-matched and language controlled.
- Describing the vocabulary richness of texts within a single corpus, after length matching.
How it works
How it works
The text is split into tokens (words). Counting distinct word types against the total number of tokens is the foundation every diversity measure builds on, so consistent tokenisation across the texts you intend to compare is the first requirement.
One or more lexical-diversity measures are computed, and they describe the same vocabulary from different angles. The type-token ratio (TTR) divides the number of distinct word types by the total number of tokens. MTLD measures the average length of consecutive runs of tokens needed before the running TTR falls to a fixed threshold. vocd-D fits a curve to TTR across repeated random samples of tokens of different sizes and reads diversity from the fitted curve. HD-D uses the hypergeometric distribution to estimate the probability that each word type appears in a random sample of tokens, and combines these probabilities into a score. For TTR, MTLD, vocd-D and HD-D, a higher value indicates greater diversity. Yule's K is a concentration measure: it rises as repetition increases, so a higher K indicates a less varied vocabulary, the opposite direction to the other measures.
Because TTR shrinks as text length grows, raw TTR scores are not directly comparable across texts of different sizes. MTLD, vocd-D and HD-D are designed to be less length-dependent, but a comparison is fair only when the texts are put on equal footing, so that differences reflect vocabulary rather than document length. Two standard routes are used. A standard-sized snippet approach cuts each text into contiguous segments of one fixed length, computes the measure on each segment, and compares the results; the same snippet length must be used for every text, and the shortest text must be long enough to supply the required snippets. Rarefaction instead draws repeated random subsamples of one fixed size from each text and averages the results, so word order is ignored. Whichever route is chosen, apply it identically to all texts being compared.
Normalised scores are compared across texts, authors, or groups. Because language and genre also shift diversity, those factors are held constant or controlled for so the comparison isolates the vocabulary-richness signal rather than confounds. Scores from different measures are on different scales and should not be compared with one another; read each measure only against the same length-matched set of texts. A difference between unmatched texts should not be interpreted as a vocabulary difference.
Common pitfalls
- Comparing raw TTR across texts of different lengths. Longer texts inevitably show lower TTR, so the comparison reflects length, not vocabulary; use MTLD, vocd-D or HD-D, or equalise lengths first.
- Failing to equalise text lengths in a comparison (no standard snippet or rarefaction) makes the diversity difference uninterpretable.
- Ignoring language and genre differences when comparing texts confounds the vocabulary-richness signal with stylistic factors.
Frequently asked questions
Why not just use the type-token ratio (TTR)?
TTR is intuitive but falls as a text gets longer, because a longer text is more likely to reuse words it has already used. That makes raw TTR unreliable for comparing texts of different lengths. MTLD, vocd-D and HD-D are designed to be less sensitive to length, which is why they are usually preferred for comparison.
How much text do I need?
No token count guarantees a reliable estimate. Very short texts give unstable scores, so a formal minimum of about ten tokens should be read only as a lower bound. Before relying on results, check the length requirements of the MTLD and vocd-D procedures in McCarthy and Jarvis (2010), and make sure the texts being compared are long enough and equal in length for the chosen snippet or rarefaction procedure.
Can I compare the diversity of two different texts directly?
Only after putting them on equal footing. Equalise their lengths with standard-sized snippets or rarefaction, and control for language and genre, because all three factors shift diversity scores independently of vocabulary richness.
Which measure should I report?
MTLD, vocd-D and HD-D are the length-robust choices validated by McCarthy and Jarvis (2010), and they are usually preferred. Yule's K describes how concentrated repeated words are, and TTR remains useful as a simple descriptive figure when texts are length-matched. Reporting more than one measure gives a fuller picture.
Related methods
Sources
McCarthy, P. M. & Jarvis, S. (2010). MTLD, vocd-D, and HD-D: A validation study of sophisticated approaches to lexical diversity assessment. Behavior Research Methods, 42(2), 381-392.
Open DOI referenceTweedie, F. J. & Baayen, R. H. (1998). How Variable May a Constant Be? Measures of Lexical Richness in Perspective. Computers and the Humanities, 32(5), 323-352.
Open DOI reference