#### N-grams

N-grams are sequences of consecutive words that frequently appear together. They capture multi-word expressions like "machine learning" or "New York City" that carry meaning as complete phrases.

#### Types

- Bigrams: 2-word sequences (e.g., "data analysis")
- Trigrams: 3-word sequences (e.g., "natural language processing")
- 4-grams & 5-grams: Longer phrases (e.g., "statistical significance test results")

#### Usage

Set minimum frequency (how often phrases appear) and lambda (collocation strength) to detect meaningful multi-word expressions. Detected n-grams can be compounded for downstream analysis.

Learn More: Text Mining with R - N-grams Chapter