Tanl Linguistic Pipeline |
A Parser using a Maximum Entropy classifier. More...
Public Member Functions | |
MeParser (char const *modelFile) | |
void | train (SentenceReader *sentenceReader, char const *modelFile) |
Train statistical model using sentences obtained through a sentenceReader , and save the generated model to modelFile . | |
Sentence * | parse (Sentence *sentence) |
Parse the given Sentence sentence . | |
void | revise (SentenceReader *sentenceReader, char const *actionFile=0) |
Produce a revision of a document parses, using either a model or an action file. | |
Public Attributes | |
Tanl::Classifier::MaxEnt | model |
A Parser using a Maximum Entropy classifier.
Parse the given Sentence sentence
.
Reimplemented from Parser::Parser.
References Tanl::Classifier::MaxEnt::BestOutcome(), Tanl::Classifier::MaxEnt::estimate(), Parser::ParseState::hasNext(), Parser::ParseState::lprob, Parser::ParseState::next(), Tanl::Classifier::Classifier::NumOutcomes(), Tanl::Classifier::Classifier::OutcomeName(), Parser::Parser::preprocess(), Parser::ParseState::prune(), and Parser::ParseState::transition().
void Parser::MeParser::revise | ( | SentenceReader * | sentenceReader, | |
char const * | actionFile = 0 | |||
) | [virtual] |
Produce a revision of a document parses, using either a model or an action file.
If an actionFile
is provided, it must contain a list of actions, one per line, to apply to the parse trees, otherwise the actions to perform revisions are determined using the model.
Reimplemented from Parser::Parser.
References Parser::ReviseStream::actions, Tanl::Classifier::MaxEnt::BestOutcome(), Parser::ReviseStream::cur, Tanl::Classifier::MaxEnt::estimate(), Parser::ReviseContextStream::hasNext(), Tanl::Classifier::Classifier::NumOutcomes(), and Tanl::Classifier::Classifier::OutcomeName().