Package org.apache.lucene.util.automaton
Class DaciukMihovAutomatonBuilder
java.lang.Object
org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder
Builds a minimal, deterministic
Automaton
that accepts a set of strings. The algorithm
requires sorted input data, but is very fast (nearly linear with the input size).-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add another character sequence to this automaton.static Automaton
build
(Collection<BytesRef> input) Build a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8.org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder.State
complete()
Finalize the automaton and return the root state.
-
Method Details
-
add
Add another character sequence to this automaton. The sequence must be lexicographically larger or equal compared to any previous sequences added to this automaton (the input must be sorted). -
complete
public org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder.State complete()Finalize the automaton and return the root state. No more strings can be added to the builder after this call.- Returns:
- Root automaton state.
-
build
Build a minimal, deterministic automaton from a sorted list ofBytesRef
representing strings in UTF-8. These strings must be binary-sorted.
-