|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.util.automaton.LevenshteinAutomata
public class LevenshteinAutomata
Class to construct DFAs that match a word within some edit distance.
Implements the algorithm described in: Schulz and Mihov: Fast String Correction with Levenshtein Automata
Field Summary | |
---|---|
static int |
MAXIMUM_SUPPORTED_DISTANCE
|
Constructor Summary | |
---|---|
LevenshteinAutomata(int[] word,
int alphaMax,
boolean withTranspositions)
Expert: specify a custom maximum possible symbol (alphaMax); default is Character.MAX_CODE_POINT. |
|
LevenshteinAutomata(String input,
boolean withTranspositions)
Create a new LevenshteinAutomata for some input String. |
Method Summary | |
---|---|
Automaton |
toAutomaton(int n)
Compute a DFA that accepts all strings within an edit distance of n . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAXIMUM_SUPPORTED_DISTANCE
Constructor Detail |
---|
public LevenshteinAutomata(String input, boolean withTranspositions)
public LevenshteinAutomata(int[] word, int alphaMax, boolean withTranspositions)
Method Detail |
---|
public Automaton toAutomaton(int n)
n
.
All automata have the following properties:
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |