N-Gram

Domain: NLP Fundamentals

🎯 Motivation

A sequence of N consecutive tokens. Used to model local word patterns and predict the next word.

📋 Concrete Example

In I love AI so much, the bigrams (2-grams) are: I love, love AI, AI so, so much.

🔗 Analogy

Like looking at words two or three at a time, like reading through a magnifying glass that shows a small window.