Tanl Linguistic Pipeline

Parser::TrainState Class Reference
[Dependency Parser]

Parser training state. More...

#include <State.h>

Inheritance diagram for Parser::TrainState:
Parser::State Parser::Iterator< Tanl::Classifier::Event * >

List of all members.

Public Member Functions

 TrainState (Sentence const &sent, GlobalInfo *info)
bool hasNext ()
Tanl::Classifier::Eventnext ()

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

Detailed Description

Parser training state.


Member Function Documentation

bool Parser::TrainState::hasNext (  )  [inline]
Returns:
whether this is a final state.

Reimplemented from Parser::State.

Referenced by Parser::EventStream::EoS(), Parser::EventStream::hasNext(), and Parser::MlpParser::parse().

Event * Parser::TrainState::next (  )  [virtual]
Returns:
the training event, consisting of features representing the state.

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().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
 
Copyright © 2005-2011 G. Attardi. Generated on 4 Mar 2011 by doxygen 1.6.1.