Tanl Linguistic Pipeline |
Parser training state. More...
#include <State.h>
Public Member Functions | |
TrainState (Sentence const &sent, GlobalInfo *info) | |
bool | hasNext () |
Tanl::Classifier::Event * | next () |
Protected Member Functions | |
Action | nextAction () |
Compute next parse action. | |
Protected Attributes | |
Sentence | annotated |
the annotated sentence | |
std::vector< int > | dependents |
count of dependents of each node |
Parser training state.
bool Parser::TrainState::hasNext | ( | ) | [inline] |
Reimplemented from Parser::State.
Referenced by Parser::EventStream::EoS(), Parser::EventStream::hasNext(), and Parser::MlpParser::parse().
Event * Parser::TrainState::next | ( | ) | [virtual] |
Implements Parser::Iterator< Tanl::Classifier::Event * >.
References nextAction(), and Parser::State::predicates().
Referenced by Parser::EventStream::next(), and Parser::MlpParser::parse().
Action Parser::TrainState::nextAction | ( | ) | [protected] |
Compute next parse action.
Determines the action (LRSEI) required to build the dependency tree.
In case of ArcEager, also generates P. In case of !CompositeAction, also generates D.
References dependents, Parser::State::extracted, Parser::State::input, Tanl::TreeToken::left, Tanl::TreeToken::right, and Parser::State::stack.
Referenced by next().