public class LevenshteinAutomata extends Object
Implements the algorithm described in: Schulz and Mihov: Fast String Correction with Levenshtein Automata
| Modifier and Type | Field and Description | 
|---|---|
| static int | MAXIMUM_SUPPORTED_DISTANCEMaximum edit distance this class can generate an automaton for. | 
| Constructor and Description | 
|---|
| 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. | 
| Modifier and Type | Method and Description | 
|---|---|
| Automaton | toAutomaton(int n)Compute a DFA that accepts all strings within an edit distance of  n. | 
| Automaton | toAutomaton(int n,
           String prefix)Compute a DFA that accepts all strings within an edit distance of  n,
 matching the specified exact prefix. | 
public static final int MAXIMUM_SUPPORTED_DISTANCE
public LevenshteinAutomata(String input, boolean withTranspositions)
public LevenshteinAutomata(int[] word,
                           int alphaMax,
                           boolean withTranspositions)
public Automaton toAutomaton(int n)
n.
 All automata have the following properties:
public Automaton toAutomaton(int n, String prefix)
n,
 matching the specified exact prefix.
 All automata have the following properties:
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.