Corpus

A corpus is a large, structured collection of texts or recorded speech gathered for linguistic study or for training language software; the plural is corpora.

In linguistics and natural language processing, a corpus is a body of language data collected for study: books, articles, transcripts, web pages or recordings. The plural is corpora. A corpus can be plain text or annotated, with extra information added to each word, such as its part of speech, its base form or the grammatical structure of its sentence.

The Brown Corpus shows what the term meant before the web. Compiled by Henry Kučera and W. Nelson Francis at Brown University, it holds 500 samples of about 2,000 words each, 1,014,312 words in all, drawn from American works first published in 1961 across 15 categories. Part-of-speech tags were added later using about 80 categories, with an automatic tagger whose errors needed extensive correction by hand. Corpora like it became the basis for statistical studies of language and for early language software such as part-of-speech taggers.

Different tasks need different corpora. Parallel corpora contain the same texts in two languages, aligned sentence by sentence, and machine translation systems are often trained on them. Treebanks, in which every sentence is fully parsed, usually run to one to three million words. Speech corpora pair recordings with transcripts for training speech recognition.

Large language models changed the scale. GPT-3, described in 2020, was trained on a mix of corpora: a filtered web crawl of about 410 billion tokens, a collection called WebText2, two corpora of books and English Wikipedia. The FineWeb dataset, published in 2024, holds 15 trillion tokens. The Brown Corpus would be a rounding error in either.

In AI news, a model's training corpus is the full body of text it learned from. Its make-up, which languages, which websites, whether it included copyrighted books, shapes what the model knows, whose writing it imitates and which legal disputes its makers may face.

Common questions

What is a corpus in NLP?

In natural language processing a corpus is a collection of text or speech used to study language or to train and test language software. It may be raw text or annotated with information such as parts of speech, and it can range from a few thousand words to trillions of tokens.

What is the plural of corpus?

The usual plural is corpora, from Latin. Corpuses is occasionally seen but is far less common in linguistics and computing.

What is the difference between a corpus and a dataset?

A corpus is a kind of dataset made of language: texts or recordings. Dataset is the broader term and covers any collection of data, such as images, sensor readings or tables of numbers. In AI writing the two are often used interchangeably when the data is text.

What is a parallel corpus?

A parallel corpus contains texts in two or more languages that are translations of each other, usually aligned so matching sentences sit side by side. Machine translation systems are often trained on parallel corpora because they show directly how a sentence in one language is expressed in another.

Finding more

Search for "text corpus", "corpus linguistics" or "parallel corpus machine translation" for the linguistic side, and "pretraining corpus" or a model's name with "training data" for AI. Reliable sources include corpus documentation from universities and the Linguistic Data Consortium, the dataset sections of model papers on arXiv, and encyclopedia articles that cite them. Be cautious with claims about what a commercial model was trained on, since companies often disclose little.

  • Text corpusReferenceDefinition, annotation, parallel corpora and uses in natural language processing.
  • Brown CorpusReferenceThe history, size and tagging of the Brown Corpus, a landmark of early corpus linguistics.
  • Language Models are Few-Shot LearnersPaperThe GPT-3 paper, which lists the corpora in its training mix and their sizes.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.