Uses of Class
org.apache.lucene.util.automaton.Automaton
Packages that use Automaton
Package
Description
API and code to convert text into indexable/searchable tokens.
Code to search indices.
Finite-state automaton for regular expressions.
-
Uses of Automaton in org.apache.lucene.analysis
Methods in org.apache.lucene.analysis that return AutomatonModifier and TypeMethodDescriptionTokenStreamToAutomaton.toAutomaton
(TokenStream in) Pulls the graph (includingPositionLengthAttribute
) from the providedTokenStream
, and creates the corresponding automaton where arcs are bytes (or Unicode code points if unicodeArcs = true) from each term. -
Uses of Automaton in org.apache.lucene.search
Fields in org.apache.lucene.search declared as AutomatonModifier and TypeFieldDescriptionprotected final Automaton
AutomatonQuery.automaton
the automaton to match index terms againstMethods in org.apache.lucene.search that return AutomatonModifier and TypeMethodDescriptionAutomatonQuery.getAutomaton()
Returns the automaton used to create this querystatic Automaton
WildcardQuery.toAutomaton
(Term wildcardquery) Convert Lucene wildcard syntax into an automaton.Constructors in org.apache.lucene.search with parameters of type AutomatonModifierConstructorDescriptionAutomatonQuery
(Term term, Automaton automaton) Create a new AutomatonQuery from anAutomaton
. -
Uses of Automaton in org.apache.lucene.util.automaton
Methods in org.apache.lucene.util.automaton that return AutomatonModifier and TypeMethodDescriptionAutomaton.clone()
Returns a clone of this automaton.Automaton.complement()
static Automaton
BasicOperations.complement
(Automaton a) Returns a (deterministic) automaton that accepts the complement of the language of the given automaton.static Automaton
Automaton.concatenate
(List<Automaton> l) Automaton.concatenate
(Automaton a) static Automaton
BasicOperations.concatenate
(List<Automaton> l) Returns an automaton that accepts the concatenation of the languages of the given automata.static Automaton
BasicOperations.concatenate
(Automaton a1, Automaton a2) Returns an automaton that accepts the concatenation of the languages of the given automata.Converts an incoming utf32 automaton to an equivalent utf8 one.AutomatonProvider.getAutomaton
(String name) Returns automaton of the given name.Automaton.intersection
(Automaton a) static Automaton
BasicOperations.intersection
(Automaton a1, Automaton a2) Returns an automaton that accepts the intersection of the languages of the given automata.static Automaton
BasicAutomata.makeAnyChar()
Returns a new (deterministic) automaton that accepts any single codepoint.static Automaton
BasicAutomata.makeAnyString()
Returns a new (deterministic) automaton that accepts all strings.static Automaton
BasicAutomata.makeChar
(int c) Returns a new (deterministic) automaton that accepts a single codepoint of the given value.static Automaton
BasicAutomata.makeCharRange
(int min, int max) Returns a new (deterministic) automaton that accepts a single codepoint whose value is in the given interval (including both end points).static Automaton
BasicAutomata.makeEmpty()
Returns a new (deterministic) automaton with the empty language.static Automaton
BasicAutomata.makeEmptyString()
Returns a new (deterministic) automaton that accepts only the empty string.static Automaton
BasicAutomata.makeInterval
(int min, int max, int digits) Returns a new automaton that accepts strings representing decimal non-negative integers in the given interval.static Automaton
BasicAutomata.makeString
(int[] word, int offset, int length) static Automaton
BasicAutomata.makeString
(String s) Returns a new (deterministic) automaton that accepts the single given string.static Automaton
BasicAutomata.makeStringUnion
(Collection<BytesRef> utf8Strings) Returns a new (deterministic and minimal) automaton that accepts the union of the given collection ofBytesRef
s representing UTF-8 encoded strings.static Automaton
static Automaton
Returns a (deterministic) automaton that accepts the intersection of the language ofa1
and the complement of the language ofa2
.Automaton.optional()
static Automaton
Returns an automaton that accepts the union of the empty string and the language of the given automaton.Automaton.repeat()
Automaton.repeat
(int min) Automaton.repeat
(int min, int max) static Automaton
Returns an automaton that accepts the Kleene star (zero or more concatenated repetitions) of the language of the given automaton.static Automaton
Returns an automaton that acceptsmin
or more concatenated repetitions of the language of the given automaton.static Automaton
Returns an automaton that accepts betweenmin
andmax
(including both) concatenated repetitions of the language of the given automaton.LevenshteinAutomata.toAutomaton
(int n) Compute a DFA that accepts all strings within an edit distance ofn
.RegExp.toAutomaton()
Constructs newAutomaton
from thisRegExp
.RegExp.toAutomaton
(Map<String, Automaton> automata) Constructs newAutomaton
from thisRegExp
.RegExp.toAutomaton
(AutomatonProvider automaton_provider) Constructs newAutomaton
from thisRegExp
.static Automaton
Automaton.union
(Collection<Automaton> l) static Automaton
BasicOperations.union
(Collection<Automaton> l) Returns an automaton that accepts the union of the languages of the given automata.static Automaton
Returns an automaton that accepts the union of the languages of the given automata.Methods in org.apache.lucene.util.automaton with parameters of type AutomatonModifier and TypeMethodDescriptionstatic void
BasicOperations.addEpsilons
(Automaton a, Collection<StatePair> pairs) Adds epsilon transitions to the given automaton.static Automaton
BasicOperations.complement
(Automaton a) Returns a (deterministic) automaton that accepts the complement of the language of the given automaton.Automaton.concatenate
(Automaton a) static Automaton
BasicOperations.concatenate
(Automaton a1, Automaton a2) Returns an automaton that accepts the concatenation of the languages of the given automata.Converts an incoming utf32 automaton to an equivalent utf8 one.static void
BasicOperations.determinize
(Automaton a) Determinizes the given automaton.static String
SpecialOperations.getCommonPrefix
(Automaton a) Returns the longest string that is a prefix of all accepted strings and visits each state at most once.static BytesRef
SpecialOperations.getCommonPrefixBytesRef
(Automaton a) static String
SpecialOperations.getCommonSuffix
(Automaton a) Returns the longest string that is a suffix of all accepted strings and visits each state at most once.static BytesRef
SpecialOperations.getCommonSuffixBytesRef
(Automaton a) SpecialOperations.getFiniteStrings
(Automaton a, int limit) Returns the set of accepted strings, assuming that at mostlimit
strings are accepted.Automaton.intersection
(Automaton a) static Automaton
BasicOperations.intersection
(Automaton a1, Automaton a2) Returns an automaton that accepts the intersection of the languages of the given automata.static boolean
Returns true if the given automaton accepts no strings.static boolean
BasicOperations.isEmptyString
(Automaton a) Returns true if the given automaton accepts the empty string and nothing else.static boolean
Returns true if the language of this automaton is finite.static boolean
Returns true if the given automaton accepts all strings.static Automaton
static void
Minimizes (and determinizes if not already deterministic) the given automaton.static void
MinimizationOperations.minimizeHopcroft
(Automaton a) Minimizes the given automaton using Hopcroft's algorithm.static Automaton
Returns a (deterministic) automaton that accepts the intersection of the language ofa1
and the complement of the language ofa2
.static Automaton
Returns an automaton that accepts the union of the empty string and the language of the given automaton.static Automaton
Returns an automaton that accepts the Kleene star (zero or more concatenated repetitions) of the language of the given automaton.static Automaton
Returns an automaton that acceptsmin
or more concatenated repetitions of the language of the given automaton.static Automaton
Returns an automaton that accepts betweenmin
andmax
(including both) concatenated repetitions of the language of the given automaton.Reverses the language of the given (non-singleton) automaton while returning the set of new initial states.static boolean
Returns true if the given string is accepted by the automaton.static boolean
BasicOperations.sameLanguage
(Automaton a1, Automaton a2) Returns true if these two automata accept exactly the same language.boolean
static boolean
Returns true if the language ofa1
is a subset of the language ofa2
.static Automaton
Returns an automaton that accepts the union of the languages of the given automata.Method parameters in org.apache.lucene.util.automaton with type arguments of type AutomatonModifier and TypeMethodDescriptionstatic Automaton
Automaton.concatenate
(List<Automaton> l) static Automaton
BasicOperations.concatenate
(List<Automaton> l) Returns an automaton that accepts the concatenation of the languages of the given automata.RegExp.toAutomaton
(Map<String, Automaton> automata) Constructs newAutomaton
from thisRegExp
.static Automaton
Automaton.union
(Collection<Automaton> l) static Automaton
BasicOperations.union
(Collection<Automaton> l) Returns an automaton that accepts the union of the languages of the given automata.Constructors in org.apache.lucene.util.automaton with parameters of type AutomatonModifierConstructorDescriptionByteRunAutomaton
(Automaton a, boolean utf8) expert: if utf8 is true, the input is already byte-basedCompiledAutomaton
(Automaton automaton) CompiledAutomaton
(Automaton automaton, Boolean finite, boolean simplify) RunAutomaton
(Automaton a, int maxInterval, boolean tableize) Constructs a newRunAutomaton
from a deterministicAutomaton
.