Also known as: N gram
N-грамма — непрерывная последовательность из n элементов текста или речи, например characters, words или tokens. N-grams используются в language modeling, text similarity, information retrieval и feature extraction.
A feature extraction scheme for text data: any sequence of N words turns into a feature value.
An ordered sequence of N words. For example, truly madly is a 2-gram. Because order is relevant, madly truly is a different 2-gram than truly madly. Name(s) for this kind of N-gram --- bigram or 2-gram trigram or 3-gram 4-gram Many natural language understanding models rely on N-grams to predict the next word that the user will type or say. For example, suppose a user typed happily ever . An NLU model based on trigrams would likely predict that the user will next type the word after. Contrast N-grams with bag of words, which are unordered sets of words. See Large language models in Machine Learning Crash Course for more information.