Uses of Class
org.apache.lucene.util.automaton.Automaton
-
Packages that use Automaton Package Description org.apache.lucene.analysis Text analysis.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 AutomatonTokenStreamToAutomaton. 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.Methods in org.apache.lucene.analysis with parameters of type Automaton Modifier and Type Method Description static TokenStreamAutomatonToTokenStream. toTokenStream(Automaton automaton)converts an automaton into a TokenStream. -
Uses of Automaton in org.apache.lucene.search
Fields in org.apache.lucene.search declared as Automaton Modifier and Type Field Description protected AutomatonAutomatonQuery. automatonthe automaton to match index terms againstMethods in org.apache.lucene.search that return Automaton Modifier and Type Method Description AutomatonAutomatonQuery. getAutomaton()Returns the automaton used to create this querystatic AutomatonPrefixQuery. toAutomaton(BytesRef prefix)Build an automaton accepting all terms with the specified prefix.static AutomatonTermRangeQuery. toAutomaton(BytesRef lowerTerm, BytesRef upperTerm, boolean includeLower, boolean includeUpper)static AutomatonWildcardQuery. 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.AutomatonQuery(Term term, Automaton automaton, int determinizeWorkLimit)Create a new AutomatonQuery from anAutomaton.AutomatonQuery(Term term, Automaton automaton, int determinizeWorkLimit, boolean isBinary)Create a new AutomatonQuery from anAutomaton.AutomatonQuery(Term term, Automaton automaton, int determinizeWorkLimit, boolean isBinary, MultiTermQuery.RewriteMethod rewriteMethod)Create a new AutomatonQuery from anAutomaton. -
Uses of Automaton in org.apache.lucene.util.automaton
Fields in org.apache.lucene.util.automaton declared as Automaton Modifier and Type Field Description AutomatonCompiledAutomaton. automatonTwo dimensional array of transitions, indexed by state number for traversal.Methods in org.apache.lucene.util.automaton that return Automaton Modifier and Type Method Description static AutomatonDaciukMihovAutomatonBuilder. build(Iterable<BytesRef> input)Deprecated.Please seeAutomata.makeStringUnion(Iterable)insteadstatic AutomatonOperations. complement(Automaton a, int determinizeWorkLimit)Returns a (deterministic) automaton that accepts the complement of the language of the given automaton.static AutomatonOperations. concatenate(List<Automaton> l)Returns an automaton that accepts the concatenation of the languages of the given automata.static AutomatonOperations. concatenate(Automaton a1, Automaton a2)Returns an automaton that accepts the concatenation of the languages of the given automata.AutomatonUTF32ToUTF8. convert(Automaton utf32)Converts an incoming utf32 automaton to an equivalent utf8 one.static AutomatonOperations. determinize(Automaton a, int workLimit)Determinizes the given automaton.AutomatonAutomaton.Builder. finish()Compiles all added states and transitions into a newAutomatonand returns it.AutomatonAutomatonProvider. getAutomaton(String name)Returns automaton of the given name.AutomatonTooComplexToDeterminizeException. getAutomaton()Returns the automaton that caused this exception, if any.static AutomatonOperations. intersection(Automaton a1, Automaton a2)Returns an automaton that accepts the intersection of the languages of the given automata.static AutomatonAutomata. makeAnyBinary()Returns a new (deterministic) automaton that accepts all binary terms.static AutomatonAutomata. makeAnyChar()Returns a new (deterministic) automaton that accepts any single codepoint.static AutomatonAutomata. makeAnyString()Returns a new (deterministic) automaton that accepts all strings.static AutomatonAutomata. makeBinary(BytesRef term)Returns a new (deterministic) automaton that accepts the single given binary term.static AutomatonAutomata. makeBinaryInterval(BytesRef min, boolean minInclusive, BytesRef max, boolean maxInclusive)Creates a new deterministic, minimal automaton accepting all binary terms in the specified interval.static AutomatonAutomata. makeBinaryStringUnion(Iterable<BytesRef> utf8Strings)Returns a new (deterministic and minimal) automaton that accepts the union of the given collection ofBytesRefs representing UTF-8 encoded strings.static AutomatonAutomata. makeBinaryStringUnion(BytesRefIterator utf8Strings)Returns a new (deterministic and minimal) automaton that accepts the union of the given iterator ofBytesRefs representing UTF-8 encoded strings.static AutomatonAutomata. makeChar(int c)Returns a new (deterministic) automaton that accepts a single codepoint of the given value.static AutomatonAutomata. 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 AutomatonAutomata. makeDecimalInterval(int min, int max, int digits)Returns a new automaton that accepts strings representing decimal (base 10) non-negative integers in the given interval.static AutomatonAutomata. makeEmpty()Returns a new (deterministic) automaton with the empty language.static AutomatonAutomata. makeEmptyString()Returns a new (deterministic) automaton that accepts only the empty string.static AutomatonAutomata. makeNonEmptyBinary()Returns a new (deterministic) automaton that accepts all binary terms except the empty string.static AutomatonAutomata. makeString(int[] word, int offset, int length)Returns a new (deterministic) automaton that accepts the single given string from the specified unicode code points.static AutomatonAutomata. makeString(String s)Returns a new (deterministic) automaton that accepts the single given string.static AutomatonAutomata. makeStringUnion(Iterable<BytesRef> utf8Strings)Returns a new (deterministic and minimal) automaton that accepts the union of the given collection ofBytesRefs representing UTF-8 encoded strings.static AutomatonAutomata. makeStringUnion(BytesRefIterator utf8Strings)Returns a new (deterministic and minimal) automaton that accepts the union of the given iterator ofBytesRefs representing UTF-8 encoded strings.static AutomatonMinimizationOperations. minimize(Automaton a, int determinizeWorkLimit)Minimizes (and determinizes if not already deterministic) the given automaton using Hopcroft's algorithm.static AutomatonOperations. minus(Automaton a1, Automaton a2, int determinizeWorkLimit)Returns a (deterministic) automaton that accepts the intersection of the language ofa1and the complement of the language ofa2.static AutomatonOperations. optional(Automaton a)Returns an automaton that accepts the union of the empty string and the language of the given automaton.static AutomatonOperations. removeDeadStates(Automaton a)Removes transitions to dead states (a state is "dead" if it is not reachable from the initial state or no accept state is reachable from it.)static AutomatonOperations. repeat(Automaton a)Returns an automaton that accepts the Kleene star (zero or more concatenated repetitions) of the language of the given automaton.static AutomatonOperations. repeat(Automaton a, int count)Returns an automaton that acceptsminor more concatenated repetitions of the language of the given automaton.static AutomatonOperations. repeat(Automaton a, int min, int max)Returns an automaton that accepts betweenminandmax(including both) concatenated repetitions of the language of the given automaton.static AutomatonOperations. reverse(Automaton a)Returns an automaton accepting the reverse language.static AutomatonOperations. reverse(Automaton a, Set<Integer> initialStates)Reverses the automaton, returning the new initial states.AutomatonLevenshteinAutomata. toAutomaton(int n)Compute a DFA that accepts all strings within an edit distance ofn.AutomatonLevenshteinAutomata. toAutomaton(int n, String prefix)Compute a DFA that accepts all strings within an edit distance ofn, matching the specified exact prefix.AutomatonRegExp. toAutomaton()Constructs newAutomatonfrom thisRegExp.AutomatonRegExp. toAutomaton(int determinizeWorkLimit)Constructs newAutomatonfrom thisRegExp.AutomatonRegExp. toAutomaton(Map<String,Automaton> automata, int determinizeWorkLimit)Constructs newAutomatonfrom thisRegExp.AutomatonRegExp. toAutomaton(AutomatonProvider automaton_provider, int determinizeWorkLimit)Constructs newAutomatonfrom thisRegExp.static AutomatonOperations. union(Collection<Automaton> l)Returns an automaton that accepts the union of the languages of the given automata.static AutomatonOperations. 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 intAutomata. appendAnyChar(Automaton a, int state)Accept any single character starting from the specified state, returning the new statestatic intAutomata. appendChar(Automaton a, int state, int c)Appends the specified character to the specified state, returning a new state.static AutomatonOperations. complement(Automaton a, int determinizeWorkLimit)Returns a (deterministic) automaton that accepts the complement of the language of the given automaton.static AutomatonOperations. concatenate(Automaton a1, Automaton a2)Returns an automaton that accepts the concatenation of the languages of the given automata.AutomatonUTF32ToUTF8. convert(Automaton utf32)Converts an incoming utf32 automaton to an equivalent utf8 one.voidAutomaton.Builder. copy(Automaton other)Copies over all states/transitions from other.voidAutomaton. copy(Automaton other)Copies over all states/transitions from other.voidAutomaton.Builder. copyStates(Automaton other)Copies over all states from other.static AutomatonOperations. determinize(Automaton a, int workLimit)Determinizes the given automaton.static StringOperations. getCommonPrefix(Automaton a)Returns the longest string that is a prefix of all accepted strings and visits each state at most once.static BytesRefOperations. getCommonPrefixBytesRef(Automaton a)Returns the longest BytesRef that is a prefix of all accepted strings and visits each state at most once.static BytesRefOperations. getCommonSuffixBytesRef(Automaton a)Returns the longest BytesRef that is a suffix of all accepted strings.static IntsRefOperations. getSingleton(Automaton a)If this automaton accepts a single input, return it.static booleanOperations. hasDeadStates(Automaton a)Returns true if this automaton has any states that cannot be reached from the initial state or cannot reach an accept state.static booleanOperations. hasDeadStatesFromInitial(Automaton a)Returns true if there are dead states reachable from an initial state.static booleanOperations. hasDeadStatesToAccept(Automaton a)Returns true if there are dead states that reach an accept state.static AutomatonOperations. intersection(Automaton a1, Automaton a2)Returns an automaton that accepts the intersection of the languages of the given automata.static booleanOperations. isEmpty(Automaton a)Returns true if the given automaton accepts no strings.static booleanOperations. isFinite(Automaton a)Returns true if the language of this automaton is finite.static booleanOperations. isTotal(Automaton a)Returns true if the given automaton accepts all strings.static booleanOperations. isTotal(Automaton a, int minAlphabet, int maxAlphabet)Returns true if the given automaton accepts all strings for the specified min/max range of the alphabet.static AutomatonMinimizationOperations. minimize(Automaton a, int determinizeWorkLimit)Minimizes (and determinizes if not already deterministic) the given automaton using Hopcroft's algorithm.static AutomatonOperations. minus(Automaton a1, Automaton a2, int determinizeWorkLimit)Returns a (deterministic) automaton that accepts the intersection of the language ofa1and the complement of the language ofa2.static AutomatonOperations. optional(Automaton a)Returns an automaton that accepts the union of the empty string and the language of the given automaton.static AutomatonOperations. removeDeadStates(Automaton a)Removes transitions to dead states (a state is "dead" if it is not reachable from the initial state or no accept state is reachable from it.)static AutomatonOperations. repeat(Automaton a)Returns an automaton that accepts the Kleene star (zero or more concatenated repetitions) of the language of the given automaton.static AutomatonOperations. repeat(Automaton a, int count)Returns an automaton that acceptsminor more concatenated repetitions of the language of the given automaton.static AutomatonOperations. repeat(Automaton a, int min, int max)Returns an automaton that accepts betweenminandmax(including both) concatenated repetitions of the language of the given automaton.static AutomatonOperations. reverse(Automaton a)Returns an automaton accepting the reverse language.static AutomatonOperations. reverse(Automaton a, Set<Integer> initialStates)Reverses the automaton, returning the new initial states.static booleanOperations. run(Automaton a, String s)Returns true if the given string is accepted by the automaton.static booleanOperations. run(Automaton a, IntsRef s)Returns true if the given string (expressed as unicode codepoints) is accepted by the automaton.static booleanOperations. sameLanguage(Automaton a1, Automaton a2)Returns true if these two automata accept exactly the same language.static booleanOperations. subsetOf(Automaton a1, Automaton a2)Returns true if the language ofa1is a subset of the language ofa2.static int[]Operations. topoSortStates(Automaton a)Returns the topological sort of all states reachable from the initial state.static AutomatonOperations. 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 AutomatonOperations. concatenate(List<Automaton> l)Returns an automaton that accepts the concatenation of the languages of the given automata.AutomatonRegExp. toAutomaton(Map<String,Automaton> automata, int determinizeWorkLimit)Constructs newAutomatonfrom thisRegExp.static AutomatonOperations. 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)Converts incoming automaton to byte-based (UTF32ToUTF8) firstByteRunAutomaton(Automaton a, boolean isBinary, int determinizeWorkLimit)expert: if isBinary is true, the input is already byte-basedCharacterRunAutomaton(Automaton a)Construct with a default number of determinizeWorkLimit.CharacterRunAutomaton(Automaton a, int determinizeWorkLimit)Constructor specifying determinizeWorkLimit.CompiledAutomaton(Automaton automaton)Create this, passing simplify=true and finite=null, so that we try to simplify the automaton and determine if it is finite.CompiledAutomaton(Automaton automaton, Boolean finite, boolean simplify)Create this.CompiledAutomaton(Automaton automaton, Boolean finite, boolean simplify, int determinizeWorkLimit, boolean isBinary)Create this.FiniteStringsIterator(Automaton a)Constructor.FiniteStringsIterator(Automaton a, int startState, int endState)Constructor.LimitedFiniteStringsIterator(Automaton a, int limit)Constructor.RunAutomaton(Automaton a, int alphabetSize)Constructs a newRunAutomatonfrom a deterministicAutomaton.RunAutomaton(Automaton a, int alphabetSize, int determinizeWorkLimit)Constructs a newRunAutomatonfrom a deterministicAutomaton.TooComplexToDeterminizeException(Automaton automaton, int determinizeWorkLimit)Use this constructor when the automaton failed to determinize.
-