Cambridge SMT System
ucam::hifst::LocalPruningConditions Class Reference

convenience class that takes care of local pruning conditions. Conditions are indexed by 1000*cc+y, so you can search through all conditions and get to the closest set of conditions that apply. More...

#include <task.hifst.localpruningconditions.hpp>

Public Member Functions

 LocalPruningConditions ()
 Empty constructor. More...
 
void add (const conditions &c)
 Add condition. More...
 
bool operator() (unsigned cc, unsigned span, unsigned numstates, float &w)
 Checks whether a given cell lattice at (cc,x,y) with numstates states qualifies for local pruning. More...
 
std::size_t size ()
 returns size of map More...
 
void clear ()
 Clears all conditions. More...
 

Detailed Description

convenience class that takes care of local pruning conditions. Conditions are indexed by 1000*cc+y, so you can search through all conditions and get to the closest set of conditions that apply.

Definition at line 60 of file task.hifst.localpruningconditions.hpp.

Constructor & Destructor Documentation

ucam::hifst::LocalPruningConditions::LocalPruningConditions ( )
inline

Empty constructor.

Definition at line 68 of file task.hifst.localpruningconditions.hpp.

Member Function Documentation

void ucam::hifst::LocalPruningConditions::add ( const conditions c)
inline

Add condition.

Definition at line 71 of file task.hifst.localpruningconditions.hpp.

Here is the caller graph for this function:

void ucam::hifst::LocalPruningConditions::clear ( )
inline

Clears all conditions.

Definition at line 108 of file task.hifst.localpruningconditions.hpp.

Here is the caller graph for this function:

bool ucam::hifst::LocalPruningConditions::operator() ( unsigned  cc,
unsigned  span,
unsigned  numstates,
float &  w 
)
inline

Checks whether a given cell lattice at (cc,x,y) with numstates states qualifies for local pruning.

Parameters
ccCategory numerical representation for the cyk cell
spanCorresponding to y coordinate of cyk cell. Note that span=y+1
numstatesNumber of states of the cell lattice (1 - 100M states)
wIf qualifies, weight for pruning will be stored here
Returns
true if qualifies, false otherwise

the underlying assumption is that no sentence will have more than 999 words

Definition at line 83 of file task.hifst.localpruningconditions.hpp.

std::size_t ucam::hifst::LocalPruningConditions::size ( )
inline

returns size of map

Definition at line 103 of file task.hifst.localpruningconditions.hpp.

Here is the caller graph for this function:


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