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

Converts patterns to instanced patterns. More...

#include <task.patternstoinstances.hpp>

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

Public Member Functions

 PatternsToInstancesTask (const ucam::util::RegistryPO &rg)
 Constructor. More...
 
bool run (Data &d)
 Runs this task and modifies Data object inserting the instanced sentence-specific source patterns we were looking for. More...
 
 ~PatternsToInstancesTask ()
 Destructor. 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::PatternsToInstancesTask< Data >

Converts patterns to instanced patterns.

Remarks
Given a set of grammar-specific source patterns and a source sentence, generate instances of these patterns. Example, given pattern w_X_w and sentence "1 3 4 5 2", generate 1_X_2, 1_3_X_2 , 1_3_4_X_2 , 1_3_X_5_2 ,...

Definition at line 36 of file task.patternstoinstances.hpp.

Constructor & Destructor Documentation

template<class Data>
ucam::hifst::PatternsToInstancesTask< Data >::PatternsToInstancesTask ( const ucam::util::RegistryPO rg)
inline

Constructor.

Parameters
rgRegistryPO object with configfile/command-line params parsed and ready to use.

Definition at line 53 of file task.patternstoinstances.hpp.

Here is the caller graph for this function:

template<class Data>
ucam::hifst::PatternsToInstancesTask< Data >::~PatternsToInstancesTask ( )
inline

Destructor.

Definition at line 77 of file task.patternstoinstances.hpp.

Here is the call graph for this function:

Member Function Documentation

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

Runs this task and modifies Data object inserting the instanced sentence-specific source patterns we were looking for.

Parameters
dData object.

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

Definition at line 65 of file task.patternstoinstances.hpp.


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