Cambridge SMT System
ucam::hifst::SentenceSpecificGrammarTask< Data > Class Template Reference

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>

Inheritance diagram for ucam::hifst::SentenceSpecificGrammarTask< Data >:
Collaboration diagram for ucam::hifst::SentenceSpecificGrammarTask< Data >:

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)
 
TaskInterfaceappendTask (TaskInterface *t)
 Appends a task class. If there is no task, append here, otherwise delegate in next task. More...
 
TaskInterfaceoperator() (TaskInterface *t)
 
TaskInterfacegetTask ()
 Return appended task. More...
 
TaskInterfacenext ()
 

Detailed Description

template<class Data>
class ucam::hifst::SentenceSpecificGrammarTask< Data >

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.

Constructor & Destructor Documentation

Constructor.

Definition at line 59 of file task.ssgrammar.hpp.

Member Function Documentation

template<class Data>
bool ucam::hifst::SentenceSpecificGrammarTask< Data >::run ( Data &  d)
inlinevirtual

run method, given a grammar and instantiated patterns, creates and returns the hashes

Parameters
ddata structure containing all required objects (grammar, patterns, ...)

Implements ucam::util::TaskInterface< Data >.

Definition at line 73 of file task.ssgrammar.hpp.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: