N-Gram Models
Analyzing text patterns.
1
N-Gram Models
N-Gram models are a fundamental concept in NLP. They analyze sequences of words or characters to identify patterns and relationships within text.
An N-Gram is a contiguous sequence of N items (words or characters) from a given text.

2
What Are N-Grams?
N-Grams are defined by the value of N:
- Unigram (N=1): Single words (e.g., "I", "like", "NLP").
- Bigram (N=2): Pairs of words (e.g., "I like", "like NLP").
- Trigram (N=3): Triplets of words (e.g., "I like NLP").