Cambridge SMT System
ucam::hifst::CYKdata Struct Reference

Data structure containing all cyk-related information. More...

#include <data.cykparser.hpp>

Collaboration diagram for ucam::hifst::CYKdata:

Public Member Functions

int freeMemory ()
 
uint getNumberWordsSentence ()
 Returns number of words in the sentence. More...
 
void storeRules (unordered_map< uint, std::vector< uint > > &c)
 Stores rules in a simple hash. More...
 
void storeRuleCounts (unordered_map< uint, uint > &c)
 Stores rule counts in a simple hash. More...
 

Public Attributes

cykparser_sentence_t sentence
 The sentence we want to parse. More...
 
grammar_categories_t categories
 Map between categories (S=1,X=2,...) More...
 
grammar_inversecategories_t vcat
 Inverse map (1=S,2=X,...) More...
 
CYKgrid cykgrid
 Cyk grid. Each cell of the grid is uniquely defined by three dimensions: [category,x,y]. More...
 
CYKbackpointers bp
 
uint success
 Success and how many parse S nodes have been found in the topmost cell. If 0, cyk parser has failed. More...
 
cykparser_ruledependencies_t rd
 coordinate dependencies for each candidate. More...
 
uint nnt
 number of non-terminals More...
 
unordered_set< std::string > nt_exceptions_maxspan
 

Detailed Description

Data structure containing all cyk-related information.

Definition at line 34 of file data.cykparser.hpp.

Member Function Documentation

int ucam::hifst::CYKdata::freeMemory ( )
inline
Remarks
Frees memory.

Definition at line 71 of file data.cykparser.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint ucam::hifst::CYKdata::getNumberWordsSentence ( )
inline

Returns number of words in the sentence.

Definition at line 90 of file data.cykparser.hpp.

void ucam::hifst::CYKdata::storeRuleCounts ( unordered_map< uint, uint > &  c)
inline

Stores rule counts in a simple hash.

Parameters
chash to fill. Keys based on cell grid axes. Values are rule counts per cell.

Definition at line 114 of file data.cykparser.hpp.

Here is the call graph for this function:

void ucam::hifst::CYKdata::storeRules ( unordered_map< uint, std::vector< uint > > &  c)
inline

Stores rules in a simple hash.

Parameters
chash to fill. Keys based on cell grid axes. Values are rule (sorted) ids.

Definition at line 98 of file data.cykparser.hpp.

Here is the call graph for this function:

Member Data Documentation

CYKbackpointers ucam::hifst::CYKdata::bp

Backpointers for each rule stored in the cyk grid to lower level cells. Each backpointer must identify the three dimensions of the cell. Each rule has as many backpointers as non-terminals.

Definition at line 51 of file data.cykparser.hpp.

grammar_categories_t ucam::hifst::CYKdata::categories

Map between categories (S=1,X=2,...)

Definition at line 40 of file data.cykparser.hpp.

CYKgrid ucam::hifst::CYKdata::cykgrid

Cyk grid. Each cell of the grid is uniquely defined by three dimensions: [category,x,y].

Definition at line 46 of file data.cykparser.hpp.

uint ucam::hifst::CYKdata::nnt

number of non-terminals

Definition at line 60 of file data.cykparser.hpp.

unordered_set<std::string> ucam::hifst::CYKdata::nt_exceptions_maxspan

Definition at line 66 of file data.cykparser.hpp.

cykparser_ruledependencies_t ucam::hifst::CYKdata::rd

coordinate dependencies for each candidate.

Definition at line 57 of file data.cykparser.hpp.

cykparser_sentence_t ucam::hifst::CYKdata::sentence

The sentence we want to parse.

Definition at line 37 of file data.cykparser.hpp.

uint ucam::hifst::CYKdata::success

Success and how many parse S nodes have been found in the topmost cell. If 0, cyk parser has failed.

Definition at line 54 of file data.cykparser.hpp.

grammar_inversecategories_t ucam::hifst::CYKdata::vcat

Inverse map (1=S,2=X,...)

Definition at line 43 of file data.cykparser.hpp.


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