Uses of Class
org.apache.lucene.util.automaton.Automaton
-
Packages that use Automaton Package Description org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.org.apache.lucene.search Code to search indices.org.apache.lucene.util.automaton Finite-state automaton for regular expressions. -
-
Uses of Automaton in org.apache.lucene.analysis
Methods in org.apache.lucene.analysis that return Automaton Modifier and Type Method Description Automaton
TokenStreamToAutomaton. 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 Automaton Modifier and Type Field Description protected Automaton
AutomatonQuery. automaton
the automaton to match index terms againstMethods in org.apache.lucene.search that return Automaton Modifier and Type Method Description Automaton
AutomatonQuery. 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 Automaton Constructor Description AutomatonQuery(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 Automaton Modifier and Type Method Description Automaton
Automaton. clone()
Returns a clone of this automaton.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
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.Automaton
UTF32ToUTF8. convert(Automaton utf32)
Converts an incoming utf32 automaton to an equivalent utf8 one.Automaton
AutomatonProvider. getAutomaton(String name)
Returns automaton of the given name.Automaton
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
Automaton. minimize(Automaton a)
Automaton
Automaton. minus(Automaton a)
static Automaton
BasicOperations. minus(Automaton a1, Automaton a2)
Returns a (deterministic) automaton that accepts the intersection of the language ofa1
and the complement of the language ofa2
.Automaton
Automaton. optional()
static Automaton
BasicOperations. optional(Automaton a)
Returns an automaton that accepts the union of the empty string and the language of the given automaton.Automaton
Automaton. repeat()
Automaton
Automaton. repeat(int min)
Automaton
Automaton. repeat(int min, int max)
static Automaton
BasicOperations. repeat(Automaton a)
Returns an automaton that accepts the Kleene star (zero or more concatenated repetitions) of the language of the given automaton.static Automaton
BasicOperations. repeat(Automaton a, int min)
Returns an automaton that acceptsmin
or more concatenated repetitions of the language of the given automaton.static Automaton
BasicOperations. repeat(Automaton a, int min, int max)
Returns an automaton that accepts betweenmin
andmax
(including both) concatenated repetitions of the language of the given automaton.Automaton
LevenshteinAutomata. toAutomaton(int n)
Compute a DFA that accepts all strings within an edit distance ofn
.Automaton
RegExp. toAutomaton()
Constructs newAutomaton
from thisRegExp
.Automaton
RegExp. toAutomaton(Map<String,Automaton> automata)
Constructs newAutomaton
from thisRegExp
.Automaton
RegExp. toAutomaton(AutomatonProvider automaton_provider)
Constructs newAutomaton
from thisRegExp
.static Automaton
Automaton. union(Collection<Automaton> l)
Automaton
Automaton. union(Automaton a)
static Automaton
BasicOperations. union(Collection<Automaton> l)
Returns an automaton that accepts the union of the languages of the given automata.static Automaton
BasicOperations. union(Automaton a1, Automaton a2)
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 Automaton Modifier and Type Method Description static 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
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.Automaton
UTF32ToUTF8. convert(Automaton utf32)
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)
static Set<IntsRef>
SpecialOperations. getFiniteStrings(Automaton a, int limit)
Returns the set of accepted strings, assuming that at mostlimit
strings are accepted.Automaton
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
BasicOperations. isEmpty(Automaton a)
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
SpecialOperations. isFinite(Automaton a)
Returns true if the language of this automaton is finite.static boolean
BasicOperations. isTotal(Automaton a)
Returns true if the given automaton accepts all strings.static Automaton
Automaton. minimize(Automaton a)
static void
MinimizationOperations. minimize(Automaton a)
Minimizes (and determinizes if not already deterministic) the given automaton.static void
MinimizationOperations. minimizeHopcroft(Automaton a)
Minimizes the given automaton using Hopcroft's algorithm.Automaton
Automaton. minus(Automaton a)
static Automaton
BasicOperations. minus(Automaton a1, Automaton a2)
Returns a (deterministic) automaton that accepts the intersection of the language ofa1
and the complement of the language ofa2
.static Automaton
BasicOperations. optional(Automaton a)
Returns an automaton that accepts the union of the empty string and the language of the given automaton.static Automaton
BasicOperations. repeat(Automaton a)
Returns an automaton that accepts the Kleene star (zero or more concatenated repetitions) of the language of the given automaton.static Automaton
BasicOperations. repeat(Automaton a, int min)
Returns an automaton that acceptsmin
or more concatenated repetitions of the language of the given automaton.static Automaton
BasicOperations. repeat(Automaton a, int min, int max)
Returns an automaton that accepts betweenmin
andmax
(including both) concatenated repetitions of the language of the given automaton.static Set<State>
SpecialOperations. reverse(Automaton a)
Reverses the language of the given (non-singleton) automaton while returning the set of new initial states.static boolean
BasicOperations. run(Automaton a, String s)
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
Automaton. subsetOf(Automaton a)
static boolean
BasicOperations. subsetOf(Automaton a1, Automaton a2)
Returns true if the language ofa1
is a subset of the language ofa2
.Automaton
Automaton. union(Automaton a)
static Automaton
BasicOperations. union(Automaton a1, Automaton a2)
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 Automaton Modifier and Type Method Description static 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.Automaton
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 Automaton Constructor Description ByteRunAutomaton(Automaton a)
ByteRunAutomaton(Automaton a, boolean utf8)
expert: if utf8 is true, the input is already byte-basedCharacterRunAutomaton(Automaton a)
CompiledAutomaton(Automaton automaton)
CompiledAutomaton(Automaton automaton, Boolean finite, boolean simplify)
RunAutomaton(Automaton a, int maxInterval, boolean tableize)
Constructs a newRunAutomaton
from a deterministicAutomaton
.
-