GraphTokenStreamFiniteStrings

Consumes a TokenStream and creates an Automaton where the transition labels are terms from the TermToBytesRefAttribute. This class also provides helpers to explore the different paths of the Automaton.

Constructors

Link copied to clipboard
constructor(in: TokenStream)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Returns the articulation points (or cut vertices) of the graph: https://en.wikipedia.org/wiki/Biconnected_component

Link copied to clipboard
fun getFiniteStrings(startState: Int, endState: Int): MutableIterator<TokenStream>

Get all finite strings that start at startState and end at endState.

Link copied to clipboard

Returns the list of tokens that start at the provided state

fun getTerms(field: String, state: Int): Array<Term>

Returns the list of terms that start at the provided state

Link copied to clipboard
fun hasSidePath(state: Int): Boolean

Returns whether the provided state is the start of multiple side paths of different length (eg: new york, ny)