Cambridge SMT System
data.grammar.utilities.hpp File Reference

Contains structures and classes for GrammarData. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ucam
 
 ucam::hifst
 

Functions

const uint ucam::hifst::getSize (const std::string &rhs)
 A generic element counter that can be used to any string. It is intended to use with either source or target side of a rule (right-hand side parts of the synchronous rule). More...
 
bool ucam::hifst::isTerminal (const std::string &word)
 Determine if the element is a terminal (i.e. a word, represented by a number) or a non-terminal (i.e. ^[A-Z]+(0-9)?). Only first position is checked. More...
 
void ucam::hifst::getFilteredNonTerminal (std::string &word)
 Return the filtered non-terminal name. For example, for the rule Z 3_XT2_5 XT2, getFilteredNonTerminal("XT2") should return XT. More...
 
void ucam::hifst::getRuleMappings (const std::vector< std::string > &source, const std::vector< std::string > &translation, unordered_map< uint, uint > *mappings)
 Given a source and translation of the same rule, sharing the same non-terminals in RHS, returns correspondences between source and target non-terminal indices. For example: X a_Y_Z_b c_Z_Y_d: mappings[0]=1; mappings[1]=0. More...
 

Detailed Description

Contains structures and classes for GrammarData.

Date
8-8-2012
Author
Gonzalo Iglesias

Definition in file data.grammar.utilities.hpp.