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.

Level: beginnerTopic: NLP embeddings

Trigram: an example

In "the quick brown fox" the trigrams are "the quick brown" and "quick brown fox".

Related terms

More NLP embeddings terms

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.