Corpora
Computational Linguistics
Course 1 · Chapter 3 · Corpora
Chapter 2 counted words in a single sentence. A real study counts them in millions. The collection a linguist or a program learns from is called a corpus, and what it contains decides what any result built on it can possibly say.
What a Corpus Is
- Definition. Wikipedia's Corpus linguistics article calls the field "an empirical method for the study of language by text corpus". Corpora are balanced, stratified collections of real-world speech or writing, and today they are generally machine-readable.
- Text corpus. The Text corpus article defines one as "a dataset, consisting of natively digital and older, digitalized, language resources", which may be annotated or unannotated. It calls corpora "the main knowledge base in corpus linguistics" and says annotated ones support statistical hypothesis testing and checking how linguistic rules apply. Other uses it lists: language technology, machine translation, language teaching and philology.
Two famous corpora
| Corpus | What the Corpus linguistics article says |
|---|---|
| Brown Corpus | a balanced corpus of about one million words of American English from 1961, analyzed by Kučera and Francis in 1967; "the first computerized corpus designed for linguistic research" |
| British National Corpus | "a 100 million word collection of a range of spoken and written texts", created in the 1990s by a consortium that included Oxford, Lancaster and the British Library |
The article adds that Quirk's corpus "was the first modern corpus to be built with the purpose of representing the whole language", and that corpora fed dictionaries and grammars such as the American Heritage Dictionary (1969) and Quirk et al.'s 1985 grammar.
Annotation
A raw corpus is just text. Annotation adds information. The Corpus linguistics article says it may include "structural markup, part-of-speech tagging, parsing, and numerous other representations", and that most lexical corpora are part-of-speech tagged. It also reports a disagreement: John Sinclair preferred minimal annotation, the Survey of English Usage team supported more. Wallis and Nelson's 3A framework describes the work as annotation (applying a scheme), abstraction (mapping the scheme onto a theoretical model) and analysis ("statistically probing, manipulating and generalising from the dataset").
| Kind of annotation | What the Text corpus article says |
|---|---|
| Part-of-speech tagging | adds a tag for each word's part of speech, such as verb, noun or adjective |
| Lemmatization | marks each word's base form |
| Interlinear glossing | makes annotation bilingual when the corpus language is not the researchers' working language |
| Treebanks | fully parsed corpora, usually smaller, "containing around one to three million words"; consistent annotation of a whole corpus is difficult |
The two sources differ a little on size: Chapter 1's Computational linguistics article gives the Penn Treebank as "over 4.5 million words" of American English, above the Text corpus article's "around one to three million". I report both and do not try to reconcile them.
Looking Inside: Concordance Lines
The Key Word in Context article calls KWIC "the most common format for concordance lines": each line places a keyword in a fixed, central position with the words before and after it. The term was coined by Hans Peter Luhn; the underlying "keyword in titles" idea was first proposed for Manchester libraries in 1864 by Andrea Crestadoro.
The text, code and outputs below are mine: an invented 66-word paragraph, run through a small script.
Four lines, one keyword in the middle. A reader sees at once what tends to follow keeper: a verb. A caution about my own script: it throws away punctuation, so a window can cross a sentence boundary. The line "was bright the [keeper]" runs from one sentence into the next.
Collocations
The Collocation article defines a collocation, in corpus linguistics, as "a series of words or terms that co-occur more often than would be expected by chance". Its examples are crystal clear, middle management, nuclear family and cosmetic surgery, plus make + decision as a verb–object pair. A collocation's meaning can be understood from its words; for an idiom "the meaning of the whole cannot be inferred from its parts". Statistically, association measures test whether co-occurrence is due to chance, and because most collocations prove significant, the scores mainly rank results. The page names mutual information, t-scores and log-likelihood, and notes KWIC analysis as a way to find them.
The idea in miniature, in my own code: compare how often two words appear next to each other with how often they would if the words were scattered at random. The "expected" figure here is my simplified calculation, not one of the measures the article names.
Strong tea occurs twice where chance predicts under 0.1; the keeper four times where chance predicts under 1. The ratio ranks strong tea as the stronger pairing. But the keeper also beats chance, which fits the article's remark that most collocations prove significant and scores mostly rank. A 66-word text is far too small for any of this to count as evidence about English; the point is to see the arithmetic.
What a Corpus Cannot Tell You
- It shows the language that went in. The Brown Corpus is American English from 1961; the BNC dates from the 1990s. Neither tells you how people write today.
- Balance is a design choice. The Corpus linguistics article describes corpora as "balanced, often stratified collections of authentic" texts meant to represent a variety. Someone decided what counted as balanced, and the page does not describe how.
- Absence is not impossibility. A construction missing from a million words may be rare, or may belong to a kind of text the corpus left out.
- Annotation has errors and theories in it. A tag is a decision; the Text corpus article says consistent annotation of a whole corpus is difficult.
Try It Yourself
Using the chapter's tokens and kwic, print concordance lines for lamp with a window of 2. What do you notice about the first line, and what does it tell you about the script?
Compute observed and expected counts for the sea, the lighthouse and strong winds. Which ratio is largest, and why should you hesitate to call it a collocation?
📄 View solutionYou want to study how people talk about money today. Explain why the Brown Corpus and the British National Corpus, as the sources describe them, would each be a poor choice on its own, and say what kind of corpus you would want instead.
📄 View solutionChapter 3 Quick Reference
- Corpus: a balanced, stratified collection of real language, usually machine-readable
- Annotation: markup, part-of-speech tags, lemmas, parse trees (treebanks)
- KWIC: keyword centred with context on both sides
- Collocation: co-occurrence more often than chance; scores mostly rank
- A corpus shows what went in: date, variety, selection