N-gram
An n-gram is a sequence of n adjacent symbols in a particular order.[src] The symbols may be n adjacent letters (including punctuation marks and blanks), syllables, or rarely whole words found in a language dataset; or adjacent phonemes extracted from a speech-recording dataset, or adjacent base pairs extracted from a genome.[src] They are collected from a text corpus or speech corpus.[src] If Latin numerical prefixes are used, then n-gram of size 1 is called a "unigram", size 2 a "bigram" (or, less commonly, a "digram") etc.[src] If, instead of the Latin ones, the English cardinal numbers are furtherly used, then they are called "four-gram", "five-gram", etc.[src] Similarly, Greek numerical prefixes such as "monomer", "dimer", "trimer", "tetramer", "pentamer", etc., or English cardinal numbers, "one-mer", "two-mer", "three-mer", etc.[src] are used in computational biology for polymers or oligomers of a known size, called k-mers.[src] When the items are words, -grams may also be called shingles.[src] In the context of natural language processing (NLP), the use of n-grams allows bag-of-words models to capture information such as word order, which would not be possible in the traditional bag of words setting.[src]
An n-gram is a sequence of n adjacent symbols in a particular order.[src] The symbols may be n adjacent letters (including punctuation marks and blanks), syllables, or rarely whole words found in a language dataset; or adjacent phonemes extracted from a speech-recording dataset, or adjacent base pairs extracted from a genome.[src] They are collected from a text corpus or speech corpus.[src] If Latin numerical prefixes are used, then n-gram of size 1 is called a "unigram", size 2 a "bigram" (or, less commonly, a "digram") etc.[src] If, instead of the Latin ones, the English cardinal numbers are furtherly used, then they are called "four-gram", "five-gram", etc.[src] Similarly, Greek numerical prefixes such as "monomer", "dimer", "trimer", "tetramer", "pentamer", etc., or English cardinal numbers, "one-mer", "two-mer", "three-mer", etc.[src] are used in computational biology for polymers or oligomers of a known size, called k-mers.[src] When the items are words, -grams may also be called shingles.[src] In the context of natural language processing (NLP), the use of n-grams allows bag-of-words models to capture information such as word order, which would not be possible in the traditional bag of words setting.[src]
18 sentences · 18 cited inline · 1 references stored
References
- Franz, Alex. All Our N-gram are Belong to You . Google Research Blog . 2006. · retrieved 2026-04-02 · rev 1346825061
Cite this reference
MLA "Franz, Alex. All Our N-gram are Belong to You . Google Research Blog . 2006." Franz, Alex. 2026-04-02. https://en.wikipedia.org/w/index.php?oldid=1346825061. Accessed 06 December 2026.
Chicago "Franz, Alex. All Our N-gram are Belong to You . Google Research Blog . 2006." Franz, Alex. 2026-04-02. https://en.wikipedia.org/w/index.php?oldid=1346825061.
APA Franz, Alex. (2026). Franz, Alex. All Our N-gram are Belong to You . Google Research Blog . 2006. Retrieved December 6, 2026, from https://en.wikipedia.org/w/index.php?oldid=1346825061
Cite this article
MLA
"N-gram." encyclopegia.org, 2026, https://encyclopegia.org/wiki/n-gram. Accessed 06 December 2026.
Chicago
"N-gram." encyclopegia.org. Accessed December 6, 2026. https://encyclopegia.org/wiki/n-gram.
APA
encyclopegia.org. (2026). N-gram. Retrieved December 6, 2026, from https://encyclopegia.org/wiki/n-gram
Accessed December 6, 2026 · CC BY-SA 4.0 · citation page · JSON