Cambridge SMT System
ucam::fsttools Namespace Reference

Classes

class  ApplyBiLMTask
 
class  ApplyLanguageModelTask
 Language model loader task, loads a language model wrapping it in a class to provide. More...
 
struct  ApplyLMData
 data structure for applylm tool More...
 
class  Bleu
 
class  BleuScorer
 
class  BleuStats
 
struct  DisambigData
 data structure for disambig tool. It needs at least a mixed case language model, mixed-case vocabulary and a transduction unigram model. More...
 
class  DisambigTask
 Disambig Task tool. Given a search space, applies a unigram transduction model (generating alternatives) and an ngram model over alternatives. More...
 
class  ExpandPathsWithTopologicalWeights
 
class  FeatureTracker
 
class  FeatureTrackerRev
 
class  IdBridge
 
struct  KenLMData
 Language Model data structure. More...
 
struct  KenLMModelHelper
 
class  LoadLanguageModelTask
 Language model loader task, loads a language model wrapping it in a class to provide. More...
 
class  LoadUnimapTask
 Loads a unigram transduction model (aka unimap file) from a file with the format accepted by srilm disambig tool. More...
 
class  LoadWordMapTask
 Loads wordmap in constructor and delivers pointer to data object during run time. More...
 
class  LRUCache
 
struct  MapCursor
 
struct  MapCursorRev
 
struct  MergeFeatures
 
class  MultiThreadedApplyLanguageModelTask
 Class for multithreaded application of language model. Inherits taskinterface and provides standalone function object behaviour. More...
 
struct  NullAction
 
struct  OLabelToFeature
 
class  OptimizeFstTask
 Convenience class that inherits Taskinterface behaviour and optimizes an fst. More...
 
struct  ProjectDeterminizeAction
 
struct  ProjectDeterminizeMinimizePushAction
 
struct  ProjectDeterminizePushAction
 
class  ReadFstTask
 Convenience class that loads an fst using a key defined in the constructor and delivers it to the data object. More...
 
struct  RunTask2
 Generic Runner2 class wrapper with the usual template structure required by the tasks in fsttools and hifst. This one is meant to be used by most of the tools. More...
 
struct  RunTask3
 Generic Runner3 class wrapper with the usual template structure required by hifst. It can be used by other tools that should support a server mode (see Runner2/Runner3 details). More...
 
class  SingleThreadedApplyLanguageModelTask
 Class for single threaded application of language model. It inherits taskinterface behaviour and also provides standalone function object behaviour. More...
 
struct  SpeedStatsData
 
class  SpeedStatsTask
 Task that reads stats from data object and writes them to a [file]. More...
 
struct  StateHandler
 
struct  StatsData
 Contains data for statistics, i.e. allows timing actions and methods called during execution. More...
 
struct  TopoFeaturesHelper
 A wrapper that runs maps labels to topological features, runs an "action" (sequence of standard fst operations defined as a policy per ActionT), and then expands the resulting lattice and moves topological features to allow for a 1-1 reverse mapping from features to output labels on the same arcs. More...
 
class  TuneSet
 
class  TuneWpWriteFstTask
 Convenience class that inherits Taskinterface behaviour and writes an fst to [file] using a key defined in the constructor. The key is used to access the registry object (i.e. actual program option telling where to write the fst) and a pointer in the data object, telling where to read the fst from. More...
 
class  WriteFstTask
 Convenience class that inherits Taskinterface behaviour and writes an fst to [file] using a key defined in the constructor. The key is used to access the registry object (i.e. actual program option telling where to write the fst) and a pointer in the data object, telling where to read the fst from. More...
 

Typedefs

typedef std::vector< float > PARAMS32
 
typedef unsigned Sid
 
typedef long long Wid
 
typedef std::vector< WidSentenceIdx
 

Functions

std::ostream & operator<< (std::ostream &o, const Bleu &b)
 
bool operator> (Bleu &b1, Bleu &b2)
 
std::ostream & operator<< (std::ostream &o, const BleuStats &b)
 
BleuStats operator+ (const BleuStats &bs1, const BleuStats &bs2)
 
BleuStats operator- (const BleuStats &bs1, const BleuStats &bs2)
 
std::string printState (std::map< int, int > &currentState)
 
template<class ArcT >
bool isFinal (fst::VectorFst< ArcT > const &fst, unsigned s)
 
void TopologicalLabelMap (fst::VectorFst< fst::StdArc > const &ifst, fst::VectorFst< TupleArc32 > *ofst, std::vector< unsigned > *features)
 
void createSourceWindows (std::string const &integerMappedSentence, unsigned srcSize, std::vector< std::vector< unsigned > > &srcw)
 
template<class ArcT , template< class > class DataT>
ucam::util::TaskInterface< DataT< ArcT > > * addApplyLM (bool bilm, ucam::util::RegistryPO const &rg)
 
template<class Arc , template< class > class MakeWeightT>
fst::ApplyLanguageModelOnTheFlyInterface< Arc > * assignKenLmHandler (util::RegistryPO const &rg, std::string const &lmkey, std::unordered_set< typename Arc::Label > &epsilons, KenLMData const &klm, MakeWeightT< Arc > &mw, bool useNaturalLog, unsigned offset=0)
 
template<class Arc , template< class > class MakeWeightT>
fst::ApplyLanguageModelOnTheFlyInterface< Arc > * assignKenLmHandlerBilingual (util::RegistryPO const &rg, std::string const &lmkey, std::unordered_set< typename Arc::Label > &epsilons, KenLMData const &klm, MakeWeightT< Arc > &mw, bool useNaturalLog, unsigned offset=0)
 
template<class Arc >
void SetGsf (fst::VectorFst< Arc > *grmfst, const float gsf)
 
template<>
void SetGsf (fst::VectorFst< TupleArc32 > *grmfst, const float gsf)
 
template<class Arc >
void loadflowerfst (ucam::util::iszfstream &umf, fst::VectorFst< Arc > &flowerlattice)
 Loads flower fst from srilm disambig unigram input file. More...
 
template<class Arc >
void tagOOVs (fst::VectorFst< Arc > *myfst, unordered_set< std::string > &vcb)
 
template<class Arc >
void recoverOOVs (fst::VectorFst< Arc > *myfst)
 Recover OOV original ids by projecting selectively. More...
 
lm::base::Model * loadKenLm (std::string const &file, lm::ngram::Config kenlm_config, unsigned offset=0)
 

Typedef Documentation

typedef std::vector<float> ucam::fsttools::PARAMS32

Definition at line 18 of file bleu.hpp.

typedef std::vector<Wid> ucam::fsttools::SentenceIdx

Definition at line 22 of file bleu.hpp.

typedef unsigned ucam::fsttools::Sid

Definition at line 19 of file bleu.hpp.

typedef long long ucam::fsttools::Wid

Definition at line 21 of file bleu.hpp.

Function Documentation

template<class ArcT , template< class > class DataT>
ucam::util::TaskInterface< DataT<ArcT> >* ucam::fsttools::addApplyLM ( bool  bilm,
ucam::util::RegistryPO const &  rg 
)

Definition at line 78 of file main-run.applylm.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Arc , template< class > class MakeWeightT>
fst::ApplyLanguageModelOnTheFlyInterface<Arc>* ucam::fsttools::assignKenLmHandler ( util::RegistryPO const &  rg,
std::string const &  lmkey,
std::unordered_set< typename Arc::Label > &  epsilons,
KenLMData const &  klm,
MakeWeightT< Arc > &  mw,
bool  useNaturalLog,
unsigned  offset = 0 
)
inline

Definition at line 30 of file task.applylm.kenlmtype.hpp.

Here is the call graph for this function:

template<class Arc , template< class > class MakeWeightT>
fst::ApplyLanguageModelOnTheFlyInterface<Arc>* ucam::fsttools::assignKenLmHandlerBilingual ( util::RegistryPO const &  rg,
std::string const &  lmkey,
std::unordered_set< typename Arc::Label > &  epsilons,
KenLMData const &  klm,
MakeWeightT< Arc > &  mw,
bool  useNaturalLog,
unsigned  offset = 0 
)
inline

Definition at line 81 of file task.applylm.kenlmtype.hpp.

Here is the call graph for this function:

void ucam::fsttools::createSourceWindows ( std::string const &  integerMappedSentence,
unsigned  srcSize,
std::vector< std::vector< unsigned > > &  srcw 
)
inline

Definition at line 35 of file main-run.applylm.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class ArcT >
bool ucam::fsttools::isFinal ( fst::VectorFst< ArcT > const &  fst,
unsigned  s 
)
inline

Definition at line 138 of file fstutils.topofeatures.hpp.

Here is the caller graph for this function:

template<class Arc >
void ucam::fsttools::loadflowerfst ( ucam::util::iszfstream umf,
fst::VectorFst< Arc > &  flowerlattice 
)
inline

Loads flower fst from srilm disambig unigram input file.

Definition at line 46 of file task.disambig.flowerfst.hpp.

Here is the call graph for this function:

lm::base::Model* ucam::fsttools::loadKenLm ( std::string const &  file,
lm::ngram::Config  kenlm_config,
unsigned  offset = 0 
)

Definition at line 108 of file task.loadlm.hpp.

Here is the caller graph for this function:

BleuStats ucam::fsttools::operator+ ( const BleuStats bs1,
const BleuStats bs2 
)

Definition at line 78 of file bleu.hpp.

BleuStats ucam::fsttools::operator- ( const BleuStats bs1,
const BleuStats bs2 
)

Definition at line 89 of file bleu.hpp.

std::ostream& ucam::fsttools::operator<< ( std::ostream &  o,
const Bleu b 
)

Definition at line 37 of file bleu.hpp.

std::ostream& ucam::fsttools::operator<< ( std::ostream &  o,
const BleuStats b 
)

Definition at line 67 of file bleu.hpp.

bool ucam::fsttools::operator> ( Bleu b1,
Bleu b2 
)

Definition at line 42 of file bleu.hpp.

std::string ucam::fsttools::printState ( std::map< int, int > &  currentState)
inline

Definition at line 127 of file fstutils.topofeatures.hpp.

Here is the caller graph for this function:

template<class Arc >
void ucam::fsttools::recoverOOVs ( fst::VectorFst< Arc > *  myfst)
inline

Recover OOV original ids by projecting selectively.

Definition at line 104 of file task.disambig.flowerfst.hpp.

template<class Arc >
void ucam::fsttools::SetGsf ( fst::VectorFst< Arc > *  grmfst,
const float  gsf 
)

Definition at line 30 of file task.disambig.flowerfst.hpp.

template<>
void ucam::fsttools::SetGsf ( fst::VectorFst< TupleArc32 > *  grmfst,
const float  gsf 
)

Definition at line 38 of file task.disambig.flowerfst.hpp.

template<class Arc >
void ucam::fsttools::tagOOVs ( fst::VectorFst< Arc > *  myfst,
unordered_set< std::string > &  vcb 
)
inline

Identifies OOVs in word lattice and rewrites them using a special tag on output side (OOV)

Definition at line 81 of file task.disambig.flowerfst.hpp.

void ucam::fsttools::TopologicalLabelMap ( fst::VectorFst< fst::StdArc > const &  ifst,
fst::VectorFst< TupleArc32 > *  ofst,
std::vector< unsigned > *  features 
)
inline

Definition at line 620 of file fstutils.topofeatures.hpp.

Here is the caller graph for this function: