AI engineering glossary · NLP embeddings
What is trigram?
Trigram (also called 3-gram): An n-gram of three consecutive words or characters. Trigrams capture more context than bigrams but appear much less often, so counts become sparse and many valid trigrams are never seen in training data.
Trigram: an example
In "the quick brown fox" the trigrams are "the quick brown" and "quick brown fox".
Related terms
More NLP embeddings terms
- Triplet loss
- Truncation
- Unicode normalisation
- Unigram
- Unigram language model tokeniser
- Viterbi algorithm
- Vocabulary
- Vocabulary size
Where you learn it
Trigram is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.