| DeSR Dependency Parser |
#include <Parser.h>


Public Member Functions | |
| Parser (WordIndex &predIndex) | |
| virtual void | train (SentenceReader *sentenceReader, char const *modelFile)=0 |
Train statistical model using sentences obtained through a sentenceReader, and save the generated model to modelFile. | |
| virtual Sentence * | parse (Sentence *sentence)=0 |
Parse the given Sentence sentence. | |
| virtual void | parse (SentenceReader *sentenceReader, std::ostream &os=std::cout) |
Parse all sentences extracted by sentenceReader, sending output to os. | |
| virtual void | revise (SentenceReader *sentenceReader, char const *actionFile=0) |
| Produce a revision of a document parses, using either a model or an action file. | |
| virtual void | showEval (int tokenCount, int las, int uas, int sentCount) |
| Print accuracy estimates. | |
| void | writeHeader (std::ostream &os) |
| Write model header to stream. | |
| Enumerator< Sentence * > * | pipe (Enumerator< std::vector< Token * > * > &tce) |
| IPipe interface. | |
| Enumerator< Sentence * > * | pipe (Enumerator< Sentence * > &tce) |
| Alternative pipeline interface, that allows connecting directly to a SentenceReader. | |
Static Public Member Functions | |
| static Parser * | create (char const *modelFile=0) |
Create a Parser based on configuration and data in file modelFile. | |
| static bool | readHeader (std::istream &is) |
| Read model header from stream. | |
Public Attributes | |
| WordIndex & | predIndex |
| GlobalInfo | info |
Static Public Attributes | |
| static IXE::conf< int > | featureCutoff |
| Drop features which occur less than this number of times. | |
| static IXE::conf< bool > | verbose |
| Control output. | |
Definition at line 72 of file Parser.h.
| virtual Sentence* Parser::Parser::parse | ( | Sentence * | sentence | ) | [pure virtual] |
Parse the given Sentence sentence.
Implemented in Parser::ApParser, Parser::MeParser, Parser::MlParser, Parser::MultiSvmParser, and Parser::SvmParser.
| Enumerator< Sentence * > * Parser::Parser::pipe | ( | Enumerator< std::vector< Token * > * > & | tce | ) |
IPipe interface.
| tce. |
Definition at line 97 of file Parser.cpp.
| static bool Parser::Parser::readHeader | ( | std::istream & | is | ) | [static] |
| virtual void Parser::Parser::revise | ( | SentenceReader * | sentenceReader, | |
| char const * | actionFile = 0 | |||
| ) | [inline, 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 in Parser::ApParser, Parser::MeParser, and Parser::MlParser.
| void Parser::Parser::showEval | ( | int | tokenCount, | |
| int | las, | |||
| int | uas, | |||
| int | sentCount | |||
| ) | [virtual] |
| void Parser::Parser::writeHeader | ( | std::ostream & | os | ) |
Write model header to stream.
| os |
Referenced by Parser::MultiSvmParser::train(), Parser::MeParser::train(), and Parser::ApParser::train().
conf< int > Parser::Parser::featureCutoff [static] |
Drop features which occur less than this number of times.
Definition at line 140 of file Parser.h.
Referenced by Parser::MultiSvmParser::train(), Parser::MeParser::train(), and Parser::ApParser::train().