Tanl Linguistic Pipeline |
Parse state. More...
#include <State.h>
Public Member Functions | |
ParseState (Sentence &sent, GlobalInfo *globalInfo, WordIndex &predIndex) | |
ParseState (ParseState &prev) | |
void | prune () |
Free the branch of derivation that lead to this state. | |
int | incRef () |
int | decRef () |
bool | hasNext () |
Tanl::Classifier::Context * | next () |
ParseState * | transition (Action action) |
Perform action represented by string action . | |
TreeToken * | copy (TreeToken *x) |
Public Attributes | |
double | lprob |
log probability | |
Protected Attributes | |
WordIndex & | predIndex |
Tanl::Classifier::Context | context |
int | refCount |
how many alternatives refer to this |
Parse state.
Provides a stream of Tanl::Classifier::Context's from a Sentence.
bool Parser::ParseState::hasNext | ( | ) |
Reimplemented from Parser::State.
References Parser::State::rootNode, Tanl::Language::rootPos(), Tanl::TreeToken::size(), and Parser::State::stack.
Referenced by Parser::SvmParser::parse(), Parser::MultiSvmParser::parse(), Parser::MlpParser::parse(), Parser::MeParser::parse(), and Parser::ApParser::parse().
Tanl::Classifier::Context * Parser::ParseState::next | ( | ) | [virtual] |
Implements Parser::Iterator< Tanl::Classifier::Context * >.
References Parser::State::predicates().
Referenced by Parser::SvmParser::parse(), Parser::MultiSvmParser::parse(), Parser::MlpParser::parse(), Parser::MeParser::parse(), and Parser::ApParser::parse().
ParseState * Parser::ParseState::transition | ( | Action | action | ) |
Perform action represented by string action
.
Reimplemented from Parser::State.
References Parser::State::extracted, Parser::State::input, Parser::State::ispunct, and Tanl::Text::RegExp::Pattern::test().
Referenced by Parser::SvmParser::parse(), Parser::MultiSvmParser::parse(), Parser::MlpParser::parse(), Parser::MeParser::parse(), and Parser::ApParser::parse().