the indices of the token indices on the 'stack' (stack.head is the stack top)
the index of the token at the front of the 'buffer'
the breadcrumbs of the partially constructed PolytreeParse
the children of the partially constructed PolytreeParse
the arc labels of the partially constructed PolytreeParse
the sentence we want to parse
the sentence we want to parse
Applies the provided sequence of Transitions (in order) to the state.
Applies the provided sequence of Transitions (in order) to the state.
a list of Transitions to be applied (in order)
the new state resulting from the sequence of transitions applied to this state
the arc labels of the partially constructed PolytreeParse
Returns whether the two tokens are connected in the parse created thus far.
the breadcrumbs of the partially constructed PolytreeParse
Returns whether the buffer has been exhausted.
the index of the token at the front of the 'buffer'
the children of the partially constructed PolytreeParse
Returns whether this is the final state of a transition parse.
Returns whether this is the final state of a transition parse.
the indices of the token indices on the 'stack' (stack.head is the stack top)
A TransitionParserState captures the current state of a transition-based parser (i.e. it corresponds to a partially constructed PolytreeParse). It includes the following fields: - the
stack
holds the indices of the tokens (note: the index of a token is its index in thetokens
vector) on the stack. It is a vector of integers. The head of the vector represents the top of the stack. - thebufferPosition
is an integer representing the index of the token that is currently at the front of the buffer. -breadcrumb
maps the index of a token to its breadcrumb (see org.allenai.nlpstack.parse.poly.polyparser.PolytreeParse for the definition of breadcrumb). If a token index does not appear as a key inbreadcrumb
, then its breadcrumb has not yet been determined. -children
maps the index of a token to the indices of its children (in the partially constructed polytree). -arcLabels
maps a pair of token indices to the label of the arc between them. This presupposes that the two tokens are neighbors in the partially constructed polytree. Note that the pair of token indices is represented as a Set, so order is irrelevant. -tokens
is the sequence of tokens in the sentence we are trying to parse. This will be invariant for all states of a given parsing process.the indices of the token indices on the 'stack' (stack.head is the stack top)
the index of the token at the front of the 'buffer'
the breadcrumbs of the partially constructed PolytreeParse
the children of the partially constructed PolytreeParse
the arc labels of the partially constructed PolytreeParse
the sentence we want to parse