Keyness Analysis

Machine Learning
Introduced by
Mike Scott
Year
1997
Type
Corpus comparison of relative word frequencies
Family
Corpus linguistics

What does it do?

Keyness analysis identifies the words that are characteristically frequent (or infrequent) in a target corpus relative to a reference corpus, using statistical tests to measure how unexpected each word's frequency is.

Mike Scott's 1997 article on key words and 'key key words' is the standard point of reference for the technique, which answers the question 'what is this text or collection distinctively about?' It is widely used in corpus linguistics and corpus-assisted discourse analysis to surface the salient vocabulary of a genre, period, author, or social group.

The intuition behind the method

Every text uses common words like 'the' and 'of' at roughly the same rate, so frequency alone does not tell you what makes a text special. Keyness analysis compares a text against a large 'normal' reference and flags the words that stand out, meaning words that occur far more (or far less) often than chance would predict. The keywords that emerge point to what a text is about: in a corpus of climate reporting they might be 'emissions', 'warming', 'carbon', pointing the analyst toward what the corpus foregrounds.

History

The notion of key words and 'key key words' was set out by Mike Scott in 1997, in the article 'PC analysis of key words — and key key words' published in System (vol. 25, no. 2, pp. 233–245). The log-likelihood ratio used in the comparison step is a standard statistic for corpus comparison.

When to use it

Use keyness analysis when you want a data-driven answer to what is distinctive about a text or corpus compared with a norm, for example to characterize a genre, track a topic across time, compare how different sources cover an issue, or find a starting point for discourse analysis. It requires a well-chosen reference corpus and is most informative for content words. It is less suitable when no appropriate reference exists, when the corpora are too small for stable frequency estimates (no fixed minimum size is established, so analysts should check whether low-frequency keywords persist under a minimum frequency filter), or when the question concerns how words are used rather than which words are salient.

Limitations and considerations

  • Results depend heavily on the reference corpus chosen; a different benchmark yields a different keyword list.
  • With large corpora, significance tests flag trivially small differences as significant unless effect sizes are reported.
  • Keyness is computed per word type, so it can fragment multiword expressions and miss patterns above the single-word level.
  • Keywords indicate salience, not meaning; interpretation still requires returning to context via concordances.
  • The standard test assumes that tokens are independent, but corpus tokens are clustered within texts and authors. Counting each occurrence separately can inflate significance, so dispersion across texts or document-level counts should be considered alongside the test.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Provides an empirical, replicable way to identify the salient vocabulary of a corpus, reducing analyst cherry-picking.
  • Surfaces both expected and unexpected keywords, often pointing to themes the analyst would not have anticipated.
  • Scales to large corpora and integrates naturally with concordance analysis for follow-up interpretation.
  • Supports comparison across time, source, or social group, which makes it useful for discourse and diachronic studies.

Applications

  • Characterizing the distinctive vocabulary of a genre, register, or specialized domain.
  • Comparing how different newspapers or political actors lexically frame the same issue.
  • Tracking changing salience of topics and terms across time periods in diachronic corpora.
  • Authorship and stylistic studies that compare an author's distinctive word use against a norm.
  • Providing a principled starting list of terms for downstream concordance and collocation analysis in discourse studies.

How it works

How it works

1

Word-frequency lists are generated for two corpora: the target (study) corpus whose distinctive vocabulary is of interest, and a reference (benchmark) corpus representing a relevant norm, often a large, balanced general corpus or a contrasting subcorpus. The choice and size of the reference corpus strongly shape which words emerge as key, so it should be selected deliberately.

2

For each word, its observed frequency in the target is compared against the frequency expected given the reference, using a statistical test. The most common choice is the log-likelihood ratio (G²), which sums observed counts times the log of observed-over-expected across the contingency cells; chi-squared is an older alternative. The statistic measures how surprising the word's frequency is under the assumption that the two corpora draw on the same distribution.

Formula
G^2 = 2\sum_i O_i \ln\!\frac{O_i}{E_i}
3

Words are ranked by their keyness scores, and those exceeding a significance threshold are flagged as positive keywords (over-represented in the target) or negative keywords (under-represented). The threshold is the critical value of the chi-squared distribution with one degree of freedom at the chosen significance level. Analysts should state the level used and whether a correction for multiple comparisons is applied, since a keyword list tests a large number of words at once. Because large corpora make even tiny differences statistically significant, good practice supplements the significance test with an effect-size measure. Two common measures are %DIFF, the difference between the normalized frequencies in target and reference expressed as a percentage of the reference frequency, and the log ratio, the base-2 logarithm of the ratio of the two normalized frequencies. Words can then be ranked by the magnitude of the difference rather than by significance alone.

4

The resulting keyword list is interpreted, typically by grouping keywords thematically and then returning to concordance lines to see how each keyword is actually used. In corpus-assisted discourse analysis, keywords are commonly used as an empirical entry point into a corpus, directing the analyst toward lexical patterns that may be worth examining in context.

Common pitfalls

  • Relying on statistical significance alone in large corpora, which produces long lists dominated by trivially over-represented function words.
  • Choosing a reference corpus that is mismatched in genre or era, which contaminates the keyword list with artifacts of that mismatch.
  • Interpreting keywords without consulting concordances, which can lead to misreadings of polysemous or ambiguous items.
  • Comparing raw counts instead of normalized frequencies when the two corpora differ greatly in size.

Frequently asked questions

What statistic is used to compute keyness?

The most common choice is the log-likelihood ratio (G²), which compares observed and expected frequencies across the two corpora. Chi-squared is an older alternative, and its approximation can be poor when expected counts are small. Analysts often report log-likelihood for significance alongside an effect-size metric such as %DIFF or log ratio, so that keywords can be ranked by how large the difference is, not only by how reliable it is.

How do I choose a reference corpus?

The reference corpus defines 'normal', so it should be larger than the target and appropriate to the comparison. A general balanced corpus (such as a national reference corpus) suits questions about what is distinctive relative to language at large, while a contrasting subcorpus suits questions about what differs between two specific varieties. A mismatched reference produces keywords that merely reflect the mismatch, so the choice must be justified.

Why report effect size as well as significance?

In large corpora, the significance test has so much power that even negligible frequency differences become 'significant', producing inflated keyword lists dominated by high-frequency function words. Effect-size measures such as %DIFF or log ratio quantify how much more frequent a word is, allowing analysts to rank by substantive importance rather than statistical detectability.

Related methods

Sources

  1. Scott, M. (1997). PC analysis of key words — and key key words. System, 25(2), 233–245.

    Open DOI reference
  2. Baker, P. (2006). Using Corpora in Discourse Analysis. Continuum.

    ISBN: 9780826477248
  3. Gabrielatos, C. (2018). Keyness analysis: Nature, metrics and techniques. In C. Taylor & A. Marchi (Eds.), Corpus Approaches to Discourse: A Critical Review (pp. 225–258). Routledge.

    ISBN: 9781138895157