Cambridge SMT System
|
This class uses instantiated patterns to analyze the grammar and deliver two hashes providing candidate rules for a (cyk) parser to validate them. The first hash is for rules with only one element (e.g. A->word, A->B). The second hash is for rules with two or more elements. Both hashes require two keys: the word position in the sentence (x) and the first element of the rule (which can be either a word or non-terminal). More...
#include <task.ssgrammar.hpp>
Public Member Functions | |
SentenceSpecificGrammarTask (const ucam::util::RegistryPO &rg) | |
Constructor. More... | |
bool | run (Data &d) |
run method, given a grammar and instantiated patterns, creates and returns the hashes More... | |
Public Member Functions inherited from ucam::util::TaskInterface< Data > | |
TaskInterface () | |
Constructor. More... | |
virtual | ~TaskInterface () |
bool | chainrun (Data &d) |
Implements chain of responsability. Calls run method and, if there is another task, call its run method too. More... | |
bool | operator() (Data &d) |
TaskInterface & | appendTask (TaskInterface *t) |
Appends a task class. If there is no task, append here, otherwise delegate in next task. More... | |
TaskInterface & | operator() (TaskInterface *t) |
TaskInterface * | getTask () |
Return appended task. More... | |
TaskInterface * | next () |
This class uses instantiated patterns to analyze the grammar and deliver two hashes providing candidate rules for a (cyk) parser to validate them. The first hash is for rules with only one element (e.g. A->word, A->B). The second hash is for rules with two or more elements. Both hashes require two keys: the word position in the sentence (x) and the first element of the rule (which can be either a word or non-terminal).
Definition at line 38 of file task.ssgrammar.hpp.
|
inline |
Constructor.
Definition at line 59 of file task.ssgrammar.hpp.
|
inlinevirtual |
run method, given a grammar and instantiated patterns, creates and returns the hashes
d | data structure containing all required objects (grammar, patterns, ...) |
Implements ucam::util::TaskInterface< Data >.
Definition at line 73 of file task.ssgrammar.hpp.