Cambridge SMT System
|
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... | |
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.
|
inline |
Empty constructor.
Definition at line 68 of file task.hifst.localpruningconditions.hpp.
|
inline |
Add condition.
Definition at line 71 of file task.hifst.localpruningconditions.hpp.
|
inline |
Clears all conditions.
Definition at line 108 of file task.hifst.localpruningconditions.hpp.
|
inline |
Checks whether a given cell lattice at (cc,x,y) with numstates states qualifies for local pruning.
cc | Category numerical representation for the cyk cell |
span | Corresponding to y coordinate of cyk cell. Note that span=y+1 |
numstates | Number of states of the cell lattice (1 - 100M states) |
w | If qualifies, weight for pruning will be stored here |
the underlying assumption is that no sentence will have more than 999 words
Definition at line 83 of file task.hifst.localpruningconditions.hpp.
|
inline |
returns size of map
Definition at line 103 of file task.hifst.localpruningconditions.hpp.