Skip to main content

Envisioning is an emerging technology research institute and advisory.

LinkedInInstagramGitHub

2011 — 2026

research
  • Reports
  • Newsletter
  • Methodology
  • Origins
  • Vocab
services
  • Research Sessions
  • Signals Workspace
  • Bespoke Projects
  • Use Cases
  • Signal Scanfree
  • Readinessfree
impact
  • ANBIMAFuture of Brazilian Capital Markets
  • IEEECharting the Energy Transition
  • Horizon 2045Future of Human and Planetary Security
  • WKOTechnology Scanning for Austria
audiences
  • Innovation
  • Strategy
  • Consultants
  • Foresight
  • Associations
  • Governments
resources
  • Pricing
  • Partners
  • How We Work
  • Data Visualization
  • Multi-Model Method
  • FAQ
  • Security & Privacy
about
  • Manifesto
  • Community
  • Events
  • Support
  • Contact
  • Login
ResearchServicesPricingPartnersAbout
ResearchServicesPricingPartnersAbout
  1. Home
  2. Vocab
  3. Trigrams

Trigrams

A sequence of three consecutive tokens used in language modeling and NLP.

Year: 1980Generality: 420
Back to Vocab

A trigram is a specific instance of an n-gram model in which sequences of exactly three consecutive tokens — words, characters, or other linguistic units — are extracted from text. As a foundational technique in natural language processing, trigrams capture local context by representing the probability of a token given the two tokens that immediately precede it. This conditional probability framework allows models to estimate how likely a particular word is to follow a given two-word context, making trigrams a natural extension of unigrams (single tokens) and bigrams (two-token sequences).

In practice, trigram language models are built by counting how often each three-token sequence appears in a large corpus, then normalizing those counts into conditional probabilities. To handle sequences that never appeared in training data — a problem known as data sparsity — techniques such as Laplace smoothing, Kneser-Ney smoothing, and interpolation with lower-order n-gram models are commonly applied. These smoothing strategies redistribute probability mass from observed sequences to unseen ones, making the model more robust when deployed on real-world text.

Trigrams have been widely applied across core NLP tasks including language modeling, machine translation, speech recognition, spell checking, and optical character recognition. Their ability to encode short-range syntactic and semantic dependencies — such as common verb phrases or prepositional patterns — gives them a meaningful advantage over unigrams and bigrams for many tasks. At the same time, trigrams are limited by their fixed window of three tokens, meaning they cannot capture long-range dependencies that span many words in a sentence.

Although neural language models such as recurrent networks and transformers have largely superseded trigram models for state-of-the-art performance, trigrams remain relevant as lightweight baselines, as features in hybrid systems, and in resource-constrained environments where neural approaches are impractical. Their simplicity, interpretability, and computational efficiency ensure they continue to appear in production systems and serve as a pedagogical entry point for understanding probabilistic language modeling.

Related

Related

N-gram
N-gram

A contiguous sequence of N items drawn from text or speech.

Generality: 700
Bigram Language Model
Bigram Language Model

A statistical model that predicts each word based solely on the preceding word.

Generality: 574
Unigram Entropy
Unigram Entropy

A measure of word-level unpredictability in text, assuming each word occurs independently.

Generality: 450
NTP (Next Token Prediction)
NTP (Next Token Prediction)

A training objective where language models learn to predict the next token in a sequence.

Generality: 795
Token
Token

The basic unit of text that language models read, process, and generate.

Generality: 720
Token Processing
Token Processing

Segmenting text into discrete units that serve as inputs for NLP models.

Generality: 720