public final class GraphTokenStreamFiniteStrings extends Object
Automaton
where the transition labels are terms from
the TermToBytesRefAttribute
.
This class also provides helpers to explore the different paths of the Automaton
.Constructor and Description |
---|
GraphTokenStreamFiniteStrings(TokenStream in) |
Modifier and Type | Method and Description |
---|---|
int[] |
articulationPoints()
Returns the articulation points (or cut vertices) of the graph:
https://en.wikipedia.org/wiki/Biconnected_component
|
Iterator<TokenStream> |
getFiniteStrings()
Get all finite strings from the automaton.
|
Iterator<TokenStream> |
getFiniteStrings(int startState,
int endState)
Get all finite strings that start at
startState and end at endState . |
List<AttributeSource> |
getTerms(int state)
Returns the list of tokens that start at the provided state
|
Term[] |
getTerms(String field,
int state)
Returns the list of terms that start at the provided state
|
boolean |
hasSidePath(int state)
Returns whether the provided state is the start of multiple side paths of different length (eg: new york, ny)
|
public GraphTokenStreamFiniteStrings(TokenStream in) throws IOException
IOException
public boolean hasSidePath(int state)
public List<AttributeSource> getTerms(int state)
public Term[] getTerms(String field, int state)
public Iterator<TokenStream> getFiniteStrings() throws IOException
IOException
public Iterator<TokenStream> getFiniteStrings(int startState, int endState)
startState
and end at endState
.public int[] articulationPoints()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.