Bigram
{{Short description|Case of an n-gram, where n is 2}}
A bigram or digram is a sequence of two adjacent elements from a string of tokens, which are typically letters, syllables, or words. A bigram is an n-gram for n=2.
The frequency distribution of every bigram in a string is commonly used for simple statistical analysis of text in many applications, including in computational linguistics, cryptography, and speech recognition.
Gappy bigrams or skipping bigrams are word pairs which allow gaps (perhaps avoiding connecting words, or allowing some simulation of dependencies, as in a dependency grammar).
Applications
Bigrams, along with other n-grams, are used in most successful language models for speech recognition.{{cite book |last1=Collins |first1=Michael John |title=Proceedings of the 34th annual meeting on Association for Computational Linguistics - |chapter=A new statistical parser based on bigram lexical dependencies |date=1996-06-24 |pages=184–191 |doi=10.3115/981863.981888 |chapter-url=http://www.aclweb.org/anthology/P96-1025 |access-date=2018-10-09 |publisher=Association for Computational Linguistics|arxiv=cmp-lg/9605012 |s2cid=12615602 }}
Bigram frequency attacks can be used in cryptography to solve cryptograms. See frequency analysis.
Bigram frequency is one approach to statistical language identification.
Some activities in logology or recreational linguistics involve bigrams. These include attempts to find English words beginning with every possible bigram,{{cite journal|last=Cohen|first=Philip M.|year=1975|title=Initial Bigrams|journal=Word Ways|volume=8|issue=2|url=http://digitalcommons.butler.edu/wordways/vol8/iss2/8 |access-date=11 September 2016}} or words containing a string of repeated bigrams, such as logogogue.{{cite journal|last=Corbin|first=Kyle|year=1989|title=Double, Triple, and Quadruple Bigrams|journal=Word Ways|volume=22|issue=3|url=http://digitalcommons.butler.edu/wordways/vol22/iss3/8 |access-date=11 September 2016}}
Bigram frequency in the English language
The frequency of the most common letter bigrams in a large English corpus is:{{Cite web|url=https://norvig.com/mayzner.html|title=English Letter Frequency Counts: Mayzner Revisited or ETAOIN SRHLDCU|website=norvig.com|access-date=2019-10-28}}
th 3.56% of 1.17% io 0.83%
he 3.07% ed 1.17% le 0.83%
in 2.43% is 1.13% ve 0.83%
er 2.05% it 1.12% co 0.79%
an 1.99% al 1.09% me 0.79%
re 1.85% ar 1.07% de 0.76%
on 1.76% st 1.05% hi 0.76%
at 1.49% to 1.05% ri 0.73%
en 1.45% nt 1.04% ro 0.73%
nd 1.35% ng 0.95% ic 0.70%
ti 1.34% se 0.93% ne 0.69%
es 1.34% ha 0.93% ea 0.69%
or 1.28% as 0.87% ra 0.69%
te 1.20% ou 0.87% ce 0.65%