jruby/docs BETA
Navigation
org.apache.lucene.util.automaton 19
C Automata
C Automaton
I AutomatonProvider
C ByteRunAutomaton
I ByteRunnable
C CharacterRunAutomaton
C CompiledAutomaton
C FiniteStringsIterator
C LevenshteinAutomata
C LimitedFiniteStringsIterator
C NFARunAutomaton
C Operations
C RegExp
C RunAutomaton
C StatePair
C TooComplexToDeterminizeException
C Transition
I TransitionAccessor
C UTF32ToUTF8
LevenshteinAutomata — members 5
F MAXIMUM_SUPPORTED_DISTANCE() int
C new(input, with_transpositions)
C new(word, alpha_max, with_transpositions)
M to_automaton(n) Automaton
M to_automaton(n, prefix) Automaton

org.apache.lucene.util.automaton.LevenshteinAutomata

class 5 members

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

Constants

constanttypenote
MAXIMUM_SUPPORTED_DISTANCE int Maximum edit distance this class can generate an automaton for.

Constructors

new

new ( String input, boolean with_transpositions )
Java: <init>(String input, boolean withTranspositions)

Create a new LevenshteinAutomata for some input String. Optionally count transpositions as a primitive edit.

new

new ( int[] word, int alpha_max, boolean with_transpositions )
Java: <init>(int[] word, int alphaMax, boolean withTranspositions)

Expert: specify a custom maximum possible symbol (alphaMax); default is Character.MAX_CODE_POINT.

Instance Methods

to_automaton

Automaton to_automaton ( int n )
Java: toAutomaton(int n)

Compute a DFA that accepts all strings within an edit distance of n.

All automata have the following properties:

  • They are deterministic (DFA).
  • There are no transitions to dead states.
  • They are not minimal (some transitions could be combined).

to_automaton

Automaton to_automaton ( int n, String prefix )
Java: toAutomaton(int n, String prefix)

Compute a DFA that accepts all strings within an edit distance of n, matching the specified exact prefix.

All automata have the following properties:

  • They are deterministic (DFA).
  • There are no transitions to dead states.
  • They are not minimal (some transitions could be combined).

this work for additional information regarding copyright ownership.