<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
Levenshtein	B-General_Concept
automaton	I-General_Concept
for	O
a	O
string	O
w	O
and	O
a	O
number	O
n	O
is	O
a	O
finite-state	B-Architecture
automaton	I-Architecture
that	O
can	O
recognize	O
the	O
set	O
of	O
all	O
strings	O
whose	O
Levenshtein	O
distance	O
from	O
w	O
is	O
at	O
most	O
n	O
.	O
That	O
is	O
,	O
a	O
string	O
x	O
is	O
in	O
the	O
formal	O
language	O
recognized	O
by	O
the	O
Levenshtein	B-General_Concept
automaton	I-General_Concept
if	O
and	O
only	O
if	O
x	O
can	O
be	O
transformed	O
into	O
w	O
by	O
at	O
most	O
n	O
single-character	O
insertions	O
,	O
deletions	O
,	O
and	O
substitutions	O
.	O
</s>
<s>
Levenshtein	B-General_Concept
automata	I-General_Concept
may	O
be	O
used	O
for	O
spelling	O
correction	O
,	O
by	O
finding	O
words	O
in	O
a	O
given	O
dictionary	O
that	O
are	O
close	O
to	O
a	O
misspelled	O
word	O
.	O
</s>
<s>
In	O
this	O
application	O
,	O
once	O
a	O
word	O
is	O
identified	O
as	O
being	O
misspelled	O
,	O
its	O
Levenshtein	B-General_Concept
automaton	I-General_Concept
may	O
be	O
constructed	O
,	O
and	O
then	O
applied	O
to	O
all	O
of	O
the	O
words	O
in	O
the	O
dictionary	O
to	O
determine	O
which	O
ones	O
are	O
close	O
to	O
the	O
misspelled	O
word	O
.	O
</s>
<s>
If	O
the	O
dictionary	O
is	O
stored	O
in	O
compressed	O
form	O
as	O
a	O
trie	B-General_Concept
,	O
the	O
time	O
for	O
this	O
algorithm	O
(	O
after	O
the	O
automaton	O
has	O
been	O
constructed	O
)	O
is	O
proportional	O
to	O
the	O
number	O
of	O
nodes	O
in	O
the	O
trie	B-General_Concept
,	O
significantly	O
faster	O
than	O
using	O
dynamic	B-Algorithm
programming	I-Algorithm
to	O
compute	O
the	O
Levenshtein	O
distance	O
separately	O
for	O
each	O
dictionary	O
word	O
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
find	O
words	O
in	O
a	O
regular	B-General_Concept
language	I-General_Concept
,	O
rather	O
than	O
a	O
finite	O
dictionary	O
,	O
that	O
are	O
close	O
to	O
a	O
given	O
target	O
word	O
,	O
by	O
computing	O
the	O
Levenshtein	B-General_Concept
automaton	I-General_Concept
for	O
the	O
word	O
,	O
and	O
then	O
using	O
a	O
Cartesian	O
product	O
construction	O
to	O
combine	O
it	O
with	O
an	O
automaton	O
for	O
the	O
regular	B-General_Concept
language	I-General_Concept
,	O
giving	O
an	O
automaton	O
for	O
the	O
intersection	O
language	O
.	O
</s>
<s>
Alternatively	O
,	O
rather	O
than	O
using	O
the	O
product	O
construction	O
,	O
both	O
the	O
Levenshtein	B-General_Concept
automaton	I-General_Concept
and	O
the	O
automaton	O
for	O
the	O
given	O
regular	B-General_Concept
language	I-General_Concept
may	O
be	O
traversed	O
simultaneously	O
using	O
a	O
backtracking	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Levenshtein	B-General_Concept
automata	I-General_Concept
are	O
used	O
in	O
Lucene	B-Language
for	O
full-text	B-Application
searches	I-Application
that	O
can	O
return	O
relevant	O
documents	O
even	O
if	O
the	O
query	O
is	O
misspelled	O
.	O
</s>
<s>
For	O
any	O
fixed	O
constant	O
n	O
,	O
the	O
Levenshtein	B-General_Concept
automaton	I-General_Concept
for	O
w	O
and	O
n	O
may	O
be	O
constructed	O
in	O
time	O
O( |w|	O
)	O
.	O
</s>
<s>
Mitankin	O
studies	O
a	O
variant	O
of	O
this	O
construction	O
called	O
the	O
universal	O
Levenshtein	B-General_Concept
automaton	I-General_Concept
,	O
determined	O
only	O
by	O
a	O
numeric	O
parameter	O
n	O
,	O
that	O
can	O
recognize	O
pairs	O
of	O
words	O
(	O
encoded	O
in	O
a	O
certain	O
way	O
by	O
bitvectors	O
)	O
that	O
are	O
within	O
Levenshtein	O
distance	O
n	O
of	O
each	O
other	O
.	O
</s>
<s>
Yet	O
a	O
third	O
finite	B-Architecture
automaton	I-Architecture
construction	O
of	O
Levenshtein	O
(	O
or	O
Damerau	O
–	O
Levenshtein	O
)	O
distance	O
are	O
the	O
Levenshtein	B-General_Concept
transducers	I-General_Concept
of	O
Hassan	O
et	O
al.	O
,	O
who	O
show	O
finite	B-Architecture
state	I-Architecture
transducers	I-Architecture
implementing	O
edit	O
distance	O
one	O
,	O
then	O
compose	O
these	O
to	O
implement	O
edit	O
distances	O
up	O
to	O
some	O
constant	O
.	O
</s>
