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.
|
Modifier and Type | Method and Description |
---|---|
Automaton |
TokenStreamToAutomaton.toAutomaton(TokenStream in)
Pulls the graph (including
PositionLengthAttribute ) from the provided TokenStream , and creates the corresponding
automaton where arcs are bytes from each term. |
Modifier and Type | Field and Description |
---|---|
protected Automaton |
AutomatonQuery.automaton
the automaton to match index terms against
|
Modifier and Type | Method and Description |
---|---|
static Automaton |
WildcardQuery.toAutomaton(Term wildcardquery)
Convert Lucene wildcard syntax into an automaton.
|
Constructor and Description |
---|
AutomatonQuery(Term term,
Automaton automaton)
Create a new AutomatonQuery from an
Automaton . |
Modifier and Type | Method and 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.
|
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.
|
static Automaton |
BasicOperations.concatenate(List<Automaton> l)
Returns an automaton that accepts the concatenation of the languages of the
given automata.
|
static Automaton |
Automaton.concatenate(List<Automaton> l)
|
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 of
BytesRef 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 of
a1 and the complement of the language of
a2 . |
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()
|
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 accepts
min 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 between
min and
max (including both) concatenated repetitions of the language
of the given automaton. |
Automaton |
Automaton.repeat(int min)
|
Automaton |
Automaton.repeat(int min,
int max)
|
Automaton |
RegExp.toAutomaton()
Constructs new
Automaton from this RegExp . |
Automaton |
RegExp.toAutomaton(AutomatonProvider automaton_provider)
Constructs new
Automaton from this RegExp . |
Automaton |
LevenshteinAutomata.toAutomaton(int n)
Compute a DFA that accepts all strings within an edit distance of
n . |
Automaton |
RegExp.toAutomaton(Map<String,Automaton> automata)
Constructs new
Automaton from this RegExp . |
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.
|
static Automaton |
BasicOperations.union(Collection<Automaton> l)
Returns an automaton that accepts the union of the languages of the given
automata.
|
static Automaton |
Automaton.union(Collection<Automaton> l)
|
Modifier and Type | Method and 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 most
limit 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 void |
MinimizationOperations.minimize(Automaton a)
Minimizes (and determinizes if not already deterministic) the given
automaton.
|
static Automaton |
Automaton.minimize(Automaton a)
|
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 of
a1 and the complement of the language of
a2 . |
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 accepts
min 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 between
min and
max (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 of
a1 is a subset of the language
of a2 . |
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.
|
Modifier and Type | Method and Description |
---|---|
static Automaton |
BasicOperations.concatenate(List<Automaton> l)
Returns an automaton that accepts the concatenation of the languages of the
given automata.
|
static Automaton |
Automaton.concatenate(List<Automaton> l)
|
Automaton |
RegExp.toAutomaton(Map<String,Automaton> automata)
Constructs new
Automaton from this RegExp . |
static Automaton |
BasicOperations.union(Collection<Automaton> l)
Returns an automaton that accepts the union of the languages of the given
automata.
|
static Automaton |
Automaton.union(Collection<Automaton> l)
|
Constructor and Description |
---|
ByteRunAutomaton(Automaton a) |
ByteRunAutomaton(Automaton a,
boolean utf8)
expert: if utf8 is true, the input is already byte-based
|
CharacterRunAutomaton(Automaton a) |
CompiledAutomaton(Automaton automaton) |
CompiledAutomaton(Automaton automaton,
Boolean finite,
boolean simplify) |
RunAutomaton(Automaton a,
int maxInterval,
boolean tableize)
Constructs a new
RunAutomaton from a deterministic
Automaton . |
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.