Definition
Continuous sequences of n items (usually words or characters) from a text.
Detailed Explanation
N-grams capture local word order by considering sequences of n consecutive words. They can be used at character, word, or even sentence level. Common values for n are 1 (unigrams), 2 (bigrams), and 3 (trigrams). N-grams help capture context and phrasal patterns.
Use Cases
Language modeling, speech recognition, machine translation, text generation