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


Public Member Functions | |
| EventStream (SentenceReader *reader, GlobalInfo *info, int sentenceCutoff=INT_MAX) | |
| Constructor. | |
| bool | hasNext () |
| Tanl::Classifier::Event * | next () |
| Generate the next training event and perform parse action. | |
| void | reset () |
| Restart. | |
| bool | EoS () |
| Tells whether it is the end of a sentence. | |
| std::string & | splitFeature () |
Public Attributes | |
| SentenceReader * | reader |
| used to read sentences | |
| TrainState * | state |
| parser state | |
| GlobalInfo * | info |
| collected information | |
| int | sentenceCutoff |
| Max number of sentence to read. | |
| int | sentenceCount |
| Sentence read so far. | |
Definition at line 36 of file EventStream.h.
| Parser::EventStream::EventStream | ( | SentenceReader * | reader, | |
| GlobalInfo * | info, | |||
| int | sentenceCutoff = INT_MAX | |||
| ) | [inline] |
Constructor.
| reader | the SentenceReader for a Dependency Grammar Corpus. | |
| info | where to store information collected from sentences. | |
| sentenceCutoff | max number of sentences to read. Default INT_MAX. |
Definition at line 46 of file EventStream.h.
| bool Parser::EventStream::EoS | ( | ) | [inline] |
Tells whether it is the end of a sentence.
Definition at line 73 of file EventStream.h.
References Parser::TrainState::hasNext(), and state.
| bool Parser::EventStream::hasNext | ( | ) | [virtual] |
Implements Parser::Iterator< Tanl::Classifier::Event * >.
Definition at line 32 of file EventStream.cpp.
References Parser::TrainState::hasNext(), info, reader, sentenceCount, sentenceCutoff, and state.
Referenced by Parser::MultiSvmParser::train(), and Parser::ApParser::train().
| Tanl::Classifier::Event * Parser::EventStream::next | ( | ) | [virtual] |
Generate the next training event and perform parse action.
Implements Parser::Iterator< Tanl::Classifier::Event * >.
Definition at line 55 of file EventStream.cpp.
References Parser::TrainState::next(), state, and Parser::State::transition().
Referenced by Parser::MultiSvmParser::train(), and Parser::ApParser::train().
| std::string& Parser::EventStream::splitFeature | ( | ) | [inline] |
Definition at line 80 of file EventStream.h.
References Parser::State::splitFeature, and state.