Cambridge SMT System
fst Namespace Reference

Classes

struct  AE
 
struct  AE< T, std::map< unsigned int, T > >
 
struct  AE< T, std::vector< T > >
 
struct  AE< T, TropicalSparseTupleWeight< T > >
 
class  ApplyLanguageModelOnTheFly
 Class that applies language model on the fly using kenlm. More...
 
struct  ApplyLanguageModelOnTheFlyInterface
 Interface for language model application Provides different run methods to do composition with a (bilingual) model. More...
 
class  CompareHyp
 Class used by priority queue to compare two hypotheses and decide which one wins. More...
 
struct  DotProductMap
 Map functor used with generic weight mapper. More...
 
struct  Expand
 
struct  GeneralMapper
 
class  GenericArcAutoMapper
 
class  GenericArcMapper
 
class  GenericWeightAutoMapper
 templated Mapper that modifies weights over an FST, passing through the other values of the arc. This mapper is to be combined with any functor that accepts Arc::Weight as a unique parameter for operator () and returns Arc::Weight. The functor itself implements the mapping details, e.g. see lexicographic unit tests More...
 
class  GenericWeightMapper
 templated Mapper that modifies weights when copying from one FST to another, passing through the other values of the arc. This mapper is to be combined with any functor that accepts FromArc::Weight as a unique parameter for operator () and returns ToArc::Weight. The functor itself implements the mapping details. More...
 
class  GetNGrams
 Functor with recursive procedure that extracts into a vector all the possible ngrams of a lattice, up to a given order, and starting from a given state. More...
 
struct  GetWeight
 
struct  GetWeight< LexStdArc >
 
struct  HackScore
 
struct  HackScore< lm::np::State >
 
struct  HackScoreBilingual
 
struct  HackScoreBilingual< lm::np::State >
 
struct  Hyp
 Struct template that represents a hypothesis in a lattice. More...
 
struct  hypcost
 Struct for priority queue comparison. More...
 
struct  LexStdToStdMapper
 LexStdArc to StdArc Mapper. More...
 
struct  LexToStd
 
struct  MakeSparseVectorWeight
 Templated Functor to generate a sparse vector weight from any other representation. More...
 
struct  MakeSparseVectorWeight< LexStdArc >
 Template specialization of MakeSparseVectorWeight functor for LexStdArc. More...
 
struct  MakeWeight
 Templated functor that creates a weight given a float. More...
 
struct  MakeWeight2
 Templated functor that creates a weight given a float. More...
 
struct  MakeWeight2< LexStdArc >
 Specialized implementation of MakeWeight2 for lexicographic semiring over two tropical weights. Second weight is set to the same input weight. More...
 
struct  MakeWeight< LexStdArc >
 Specialized implementation of MakeWeight for lexicographic semiring over two tropical weights. Second weight is set to One(). More...
 
struct  MakeWeight< TupleArc32 >
 Template specialization of functor MakeWeight for TupleArc32. See lexicographic-tropical-tropical-funcs.h. More...
 
class  MultiUnionRational
 This class creates the Union of an arbitrarily large number of fsts. This implementation was suggested by Cyril (13-08-2009), as a more efficient alternative to using consecutive Union() over two VectorFsts. The reason being that this generates internally a list of ReplaceFsts. More...
 
class  MultiUnionReplace
 This class creates the Union of an arbitrarily large number of fsts. This implementation uses one RTN to generate the union. More...
 
struct  ParamsInit
 
class  RelabelUtil
 Utility functor for relabeling one or more lattices. Note that you can chain commands. See Unit test in fstutils.gtest.cpp for an example. More...
 
struct  Scale
 
struct  Scale< lm::np::State >
 
struct  ScaleWeight
 Function object that applies to every single weight a scaling factor. More...
 
struct  ScaleWeight< LexStdArc >
 Template specialization for LexStdArc of ScaleWeight. More...
 
struct  Scorer
 
struct  Scorer< lm::np::State, lm::np::Model, IdBridgeT, HackScoreT >
 
struct  StateHandler
 
struct  StateHandler< lm::np::State >
 
struct  StdToLexStdMapper
 StdArc to LexStdArc mapper. More...
 
struct  StdToTropicalSparseMapper
 
struct  StdToVector
 Functor that converts tropical to sparse tuple weight. More...
 
class  TropicalSparseTupleWeight
 Implements Tropical Sparse tuple weight semiring, extending from openfst SparsePowerWeight class. More...
 
struct  VectorToStd
 Functor to convert sparse tuple weight to tropical (single weight) More...
 
class  WordPenaltyMapper
 templated Mapper that inserts a word penalty over an FST, skipping user defined epsilon arcs. More...
 

Typedefs

typedef unsigned WordId
 
typedef std::basic_string< WordIdNGram
 
typedef std::unordered_map< NGram, StdArc::Weight, ucam::util::hashfvecuint, ucam::util::hasheqvecuintNGramList
 
typedef std::vector< NGramNGramVector
 
typedef LexicographicArc< StdArc::Weight, StdArc::Weight > LexStdArc
 
typedef LexStdArc::Weight LexStdWeight
 
typedef GeneralMapper< ArcTpl< TropicalSparseTupleWeight< float > >, ArcTpl< TropicalSparseTupleWeight< double > >, ExpandExpandMapper
 

Functions

template<class Arc >
void PrintFst (const Fst< Arc > &fst, std::ostream *os)
 Templated method that writes an fst in openfst text format to a stream. More...
 
bool DetectFstFile (std::string const &filename, std::string const &extname="fst")
 Detect trivially by extension whether it is an fst or not. More...
 
template<class Arc >
Fst< Arc > * FstRead (const std::string &filename)
 Templated method that reads an fst. More...
 
template<class Arc >
VectorFst< Arc > * VectorFstRead (const std::string &filename)
 Templated method that reads VectorFst. More...
 
template<class Arc >
ConstFst< Arc > * ConstFstRead (const std::string &filename)
 Templated method that reads ConstFst. More...
 
template<class Arc >
void FstWrite (const Fst< Arc > &fst, const std::string &filename, const std::string &txtname="txt")
 Templated method that writes an fst either in binary or text format. More...
 
template<class Arc , class HypT >
void printStrings (const VectorFst< Arc > &fst, std::vector< HypT > *hyps)
 Traverses an fst and stores the hypotheses in a vector. Typically the fst is the result of ShortestPath. The fst should not have cycles. More...
 
template<class StateT >
std::string printDebug (StateT const &state)
 
template<class Arc >
void filterTransducerByLength (VectorFst< Arc > &myfst, unsigned min, unsigned max)
 
template<class Arc >
void extractNGrams (VectorFst< Arc > &myfst, std::vector< NGram > &ngrams, unsigned maxorder)
 
template<class Arc >
ComposeFst< Arc > RPhiCompose (const Fst< Arc > &fstlhs, const Fst< Arc > &fstrhs, const typename Arc::Label kSpecialLabel)
 Performs composition with PHI, based on OpenFST matchers PHI transitions are expected on fstrhs. More...
 
template<class Arc >
ComposeFst< Arc > RRhoCompose (const VectorFst< Arc > &fstlhs, const VectorFst< Arc > &fstrhs, const typename Arc::Label kSpecialLabel=RHO)
 Performs composition with RHO, based on OpenFST matchers RHO transitions are expected on fstrhs. More...
 
float ZPosInfinity ()
 Just a wrapper to maintain compatibility with OpenFST 1.3.1, last version using kPosInfinity constant. More...
 
template<class Arc >
void extractSourceVocabulary (const fst::VectorFst< Arc > &myfst, unordered_set< std::string > *vcb)
 Extract source (left-side) vocabulary from an fst. More...
 
template<class Arc >
void extractSourceVocabulary (const fst::VectorFst< Arc > &myfst, unordered_set< unsigned > *vcb, unsigned offset=0)
 Extract source (left-side) vocabulary (integers) from an fst. More...
 
template<class Arc >
void extractTargetVocabulary (const fst::VectorFst< Arc > &myfst, unordered_set< std::string > *vcb)
 Extract target (right-side) vocabulary from an fst. More...
 
template<class Arc >
void buildSubstringTransducer (fst::VectorFst< Arc > *myfst)
 Builds substring version of an fst. This is a destructive implementation. More...
 
template<class Arc >
fst::VectorFst< Arc > * EncodeDeterminizeMinimizeDecode (fst::VectorFst< Arc > *myfst)
 Encodes, determinizes, minimizes and decodes an fst. More...
 
template<class Arc >
void EncodeDeterminizeMinimizeDecode (fst::Fst< Arc > const &myfst, fst::VectorFst< Arc > *out)
 
template<class Arc , class CharTypeT , class StringTypeT >
std::basic_string< CharTypeT > FstGetBestHypothesis (const fst::VectorFst< Arc > &latfst)
 Takes the 1-best of an fst and converts to string. More...
 
template<class Arc , class CharTypeT >
void FstGetBestHypothesis (const fst::VectorFst< Arc > &latfst, std::vector< CharTypeT > &hyp)
 
template<class Arc >
void FstGetBestStringHypothesis (const fst::VectorFst< Arc > &latfst, std::string &hyp)
 
template<class Arc >
void printstrings (const fst::VectorFst< Arc > &pcostslat, std::ostream *hyps, unsigned s=0)
 Trivial function that outputs all the hypothesis in the lattice with its cost. More...
 
template<class Arc >
void printstrings (const fst::VectorFst< Arc > &fst, unordered_map< std::string, float > &finalhyps, bool input=true)
 Prints input/output strings - weight from a lattice as a hash. More...
 
unsigned ShortestPathLength (const fst::VectorFst< fst::StdArc > *fst)
 
template<class Arc >
fst::VectorFst< Arc > * PushWeightsToFinal (const fst::VectorFst< Arc > *fst)
 
fst::VectorFst< fst::LogArc > * StdToLog (const fst::VectorFst< fst::StdArc > *fst)
 
fst::VectorFst< fst::StdArc > * LogToStd (const fst::VectorFst< fst::LogArc > *fst)
 
fst::VectorFst< fst::StdArc > * FstScaleWeights (fst::VectorFst< fst::StdArc > *fst, const double scale)
 
template<class Arc >
void GetMinAndMaxHypothesisLength (const fst::VectorFst< Arc > *fst, unsigned &jMin, unsigned &jMax)
 
fst::StdArc::Label GetFirstUnusedLabelId (const fst::VectorFst< fst::StdArc > *fst)
 
void SetFinalStateCost (fst::MutableFst< fst::StdArc > *fst, const fst::StdArc::Weight cost)
 
template<class Arc >
void string2fst (const std::string &sidxwords, fst::VectorFst< Arc > *fst, const std::string &tidxwords="", typename Arc::Weight finalweight=Arc::Weight::One())
 Convenience method that creates an fsa/fst from one/two string(s) of numbers. More...
 
template<class Arc >
ComposeFst< Arc > MultiEpsilonCompose (const Fst< Arc > &fstlhs, const Fst< Arc > &fstrhs, const std::vector< typename Arc::Label > &multiepsilons)
 Convenience function that performs composition with multiple epsilons. More...
 
void listSparseFeatureIndices (VectorFst< TupleArc32 > &myfst, unordered_set< uint > &idx)
 Traverses a machine and returns the indices actually used for the sparse vector weight tropical semiring. More...
 
template<typename T >
DotProduct (const TropicalSparseTupleWeight< T > &w, const std::vector< T > &vw)
 Implements Dot product of two vector weights. More...
 
template<class T >
TropicalSparseTupleWeight< T > Plus (const TropicalSparseTupleWeight< T > &vw1, const TropicalSparseTupleWeight< T > &vw2)
 
template<typename T >
bool ApproxEqual (const TropicalSparseTupleWeight< T > &vw1, const TropicalSparseTupleWeight< T > &vw2, float delta=kDelta)
 
template<class T >
TropicalSparseTupleWeight< T > Times (const TropicalSparseTupleWeight< T > &w1, const TropicalSparseTupleWeight< T > &w2)
 
template<class T >
TropicalSparseTupleWeight< T > Divide (const TropicalSparseTupleWeight< T > &w1, const TropicalSparseTupleWeight< T > &w2, DivideType type=DIVIDE_ANY)
 
template<typename T , typename Collection >
Collection ParseParamString (const std::string &stringparams)
 

Typedef Documentation

typedef LexicographicArc< StdArc::Weight, StdArc::Weight> fst::LexStdArc

Definition at line 36 of file lexicographic-tropical-tropical-incls.h.

typedef LexStdArc::Weight fst::LexStdWeight

Definition at line 37 of file lexicographic-tropical-tropical-incls.h.

typedef std::basic_string<WordId> fst::NGram

Definition at line 21 of file fstutils.extractngrams.hpp.

typedef std::unordered_map<NGram, StdArc::Weight, ucam::util::hashfvecuint, ucam::util::hasheqvecuint> fst::NGramList

Definition at line 25 of file fstutils.extractngrams.hpp.

typedef std::vector<NGram> fst::NGramVector

Definition at line 26 of file fstutils.extractngrams.hpp.

typedef unsigned fst::WordId

Definition at line 20 of file fstutils.extractngrams.hpp.

Function Documentation

template<typename T >
bool fst::ApproxEqual ( const TropicalSparseTupleWeight< T > &  vw1,
const TropicalSparseTupleWeight< T > &  vw2,
float  delta = kDelta 
)
inline

Definition at line 155 of file fsttools/include/tropical-sparse-tuple-weight.h.

Here is the caller graph for this function:

template<class Arc >
void fst::buildSubstringTransducer ( fst::VectorFst< Arc > *  myfst)

Builds substring version of an fst. This is a destructive implementation.

Remarks
A substring fst accepts all the hypotheses in the original fst plus all its substrings. A substring fst can be generated easily by setting all states to final and adding epsilon arcs from start state to every state.
Parameters
myfstThe input is the original fst. After running to completion, will contain the substring version of the fst.

Definition at line 118 of file fstutils.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Arc >
ConstFst<Arc>* fst::ConstFstRead ( const std::string &  filename)
inline

Templated method that reads ConstFst.

Parameters
filenamebinary [file] to read from.
Returns
pointer ConstFst<StdArc>.

Definition at line 94 of file fstio.hpp.

Here is the call graph for this function:

bool fst::DetectFstFile ( std::string const &  filename,
std::string const &  extname = "fst" 
)
inline

Detect trivially by extension whether it is an fst or not.

Definition at line 47 of file fstio.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TropicalSparseTupleWeight< T > fst::Divide ( const TropicalSparseTupleWeight< T > &  w1,
const TropicalSparseTupleWeight< T > &  w2,
DivideType  type = DIVIDE_ANY 
)
inline

Definition at line 174 of file fsttools/include/tropical-sparse-tuple-weight.h.

Here is the caller graph for this function:

template<typename T >
T fst::DotProduct ( const TropicalSparseTupleWeight< T > &  w,
const std::vector< T > &  vw 
)

Implements Dot product of two vector weights.

Definition at line 120 of file fsttools/include/tropical-sparse-tuple-weight.h.

Here is the caller graph for this function:

template<class Arc >
fst::VectorFst<Arc>* fst::EncodeDeterminizeMinimizeDecode ( fst::VectorFst< Arc > *  myfst)
inline

Encodes, determinizes, minimizes and decodes an fst.

Remarks
This function is used approximate determinization to a transducer that is non-determinizable, i.e. the transducer is not functional, as it can transduce more than one output string per single input string (http://www.openfst.org/twiki/bin/view/FST/FstGlossary#FunctionalDef). The transducer is encoded into an non-cyclic weighted automaton, which can be safely determinized and minimized. Finally, the automaton is decoded back to a transducer. Important: the function is destructive in the sense that myfst also gets modified for the encoding step.
Parameters
myfstThe input is the original fst. <== Modified.
Returns
pseudo-determinized fst.

Definition at line 149 of file fstutils.hpp.

Here is the caller graph for this function:

template<class Arc >
void fst::EncodeDeterminizeMinimizeDecode ( fst::Fst< Arc > const &  myfst,
fst::VectorFst< Arc > *  out 
)

Definition at line 164 of file fstutils.hpp.

template<class Arc >
void fst::extractNGrams ( VectorFst< Arc > &  myfst,
std::vector< NGram > &  ngrams,
unsigned  maxorder 
)
inline

Definition at line 72 of file fstutils.extractngrams.hpp.

Here is the call graph for this function:

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

Extract source (left-side) vocabulary from an fst.

Parameters
myfstThe fst or lattice for which we want to extract the vocabulary.
vcbTo store the vocabulary (as strings).

Definition at line 42 of file fstutils.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Arc >
void fst::extractSourceVocabulary ( const fst::VectorFst< Arc > &  myfst,
unordered_set< unsigned > *  vcb,
unsigned  offset = 0 
)
inline

Extract source (left-side) vocabulary (integers) from an fst.

Parameters
myfstThe fst or lattice for which we want to extract the vocabulary.
vcbTo store the vocabulary (as Arc::Labels)
offsetOffset summed to each label id

Definition at line 67 of file fstutils.hpp.

template<class Arc >
void fst::extractTargetVocabulary ( const fst::VectorFst< Arc > &  myfst,
unordered_set< std::string > *  vcb 
)

Extract target (right-side) vocabulary from an fst.

Parameters
myfstThe fst or lattice for which we want to extract the vocabulary.
vcbTo store the vocabulary.

Definition at line 91 of file fstutils.hpp.

Here is the call graph for this function:

template<class Arc >
void fst::filterTransducerByLength ( VectorFst< Arc > &  myfst,
unsigned  min,
unsigned  max 
)
inline

Definition at line 29 of file fstutils.extractngrams.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Arc , class CharTypeT , class StringTypeT >
std::basic_string<CharTypeT> fst::FstGetBestHypothesis ( const fst::VectorFst< Arc > &  latfst)
inline

Takes the 1-best of an fst and converts to string.

Parameters
latfstLattice from which we want to obtain the 1-best as a string.
Returns
basic_string, templated.
Remarks
Projects on the input first.

Definition at line 192 of file fstutils.hpp.

template<class Arc , class CharTypeT >
void fst::FstGetBestHypothesis ( const fst::VectorFst< Arc > &  latfst,
std::vector< CharTypeT > &  hyp 
)

Definition at line 218 of file fstutils.hpp.

template<class Arc >
void fst::FstGetBestStringHypothesis ( const fst::VectorFst< Arc > &  latfst,
std::string &  hyp 
)

Definition at line 229 of file fstutils.hpp.

Here is the caller graph for this function:

template<class Arc >
Fst<Arc>* fst::FstRead ( const std::string &  filename)
inline

Templated method that reads an fst.

Parameters
filenamebinary [file] to read from.
Returns
A generic pointer to an fst. This pointer must be deleted.

Definition at line 64 of file fstio.hpp.

Here is the call graph for this function:

fst::VectorFst<fst::StdArc>* fst::FstScaleWeights ( fst::VectorFst< fst::StdArc > *  fst,
const double  scale 
)
inline

Definition at line 387 of file fstutils.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Arc >
void fst::FstWrite ( const Fst< Arc > &  fst,
const std::string &  filename,
const std::string &  txtname = "txt" 
)
inline

Templated method that writes an fst either in binary or text format.

Parameters
fstGeneric fst
filename[file] to write to.
fstnamefst extension, defaults to "fst"

Definition at line 111 of file fstio.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

fst::StdArc::Label fst::GetFirstUnusedLabelId ( const fst::VectorFst< fst::StdArc > *  fst)
inline

Definition at line 429 of file fstutils.hpp.

template<class Arc >
void fst::GetMinAndMaxHypothesisLength ( const fst::VectorFst< Arc > *  fst,
unsigned &  jMin,
unsigned &  jMax 
)
inline

Definition at line 414 of file fstutils.hpp.

Here is the call graph for this function:

void fst::listSparseFeatureIndices ( VectorFst< TupleArc32 > &  myfst,
unordered_set< uint > &  idx 
)
inline

Traverses a machine and returns the indices actually used for the sparse vector weight tropical semiring.

Definition at line 28 of file tropical-sparse-tuple-weight-funcs.h.

Here is the caller graph for this function:

fst::VectorFst<fst::StdArc>* fst::LogToStd ( const fst::VectorFst< fst::LogArc > *  fst)
inline

Definition at line 378 of file fstutils.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Arc >
ComposeFst<Arc> fst::MultiEpsilonCompose ( const Fst< Arc > &  fstlhs,
const Fst< Arc > &  fstrhs,
const std::vector< typename Arc::Label > &  multiepsilons 
)

Convenience function that performs composition with multiple epsilons.

Parameters
fstlhs: left FST to compose
fstrhs: right FST to compose
multiepsilonsa vector of labels different from 0 which are to be considered as epsilons in the left FST.
Returns
Composed Fst.

Definition at line 35 of file fstutils.multiepsiloncompose.hpp.

template<typename T , typename Collection >
Collection fst::ParseParamString ( const std::string &  stringparams)

Definition at line 45 of file params.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T >
TropicalSparseTupleWeight< T > fst::Plus ( const TropicalSparseTupleWeight< T > &  vw1,
const TropicalSparseTupleWeight< T > &  vw2 
)
inline

Definition at line 146 of file fsttools/include/tropical-sparse-tuple-weight.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class StateT >
std::string fst::printDebug ( StateT const &  state)

Definition at line 122 of file fstutils.applylmonthefly.hpp.

Here is the caller graph for this function:

template<class Arc >
void fst::PrintFst ( const Fst< Arc > &  fst,
std::ostream *  os 
)
inline

Templated method that writes an fst in openfst text format to a stream.

Parameters
fstfst we want to write
osGeneric output stream.

Definition at line 35 of file fstio.hpp.

Here is the caller graph for this function:

template<class Arc , class HypT >
void fst::printStrings ( const VectorFst< Arc > &  fst,
std::vector< HypT > *  hyps 
)

Traverses an fst and stores the hypotheses in a vector. Typically the fst is the result of ShortestPath. The fst should not have cycles.

Parameters
fstThe input fst, typically a lattice resulting from ShortestPath, without cycle.
hypsThe resulting hypotheses.

Definition at line 170 of file fstio.hpp.

Here is the call graph for this function:

template<class Arc >
void fst::printstrings ( const fst::VectorFst< Arc > &  pcostslat,
std::ostream *  hyps,
unsigned  s = 0 
)
inline

Trivial function that outputs all the hypothesis in the lattice with its cost.

Remarks
. For big lattices, this method requires in practice no extra memory footprint than the FST itself, unless hypotheses are incredibly large. The output is unsorted. Hypotheses are printed with the following format: lword1 lword2 ... lwordn || rword1 rword2 ... rwordm || weight[,weight] Supports lexicographic semiring format, prints both weights.
Parameters
pcostslatLattice we will take to print strings
hypsOutput stream (cout, a [file], ...)
sStarting state.

Definition at line 253 of file fstutils.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Arc >
void fst::printstrings ( const fst::VectorFst< Arc > &  fst,
unordered_map< std::string, float > &  finalhyps,
bool  input = true 
)
inline

Prints input/output strings - weight from a lattice as a hash.

Definition at line 308 of file fstutils.hpp.

Here is the call graph for this function:

template<class Arc >
fst::VectorFst<Arc>* fst::PushWeightsToFinal ( const fst::VectorFst< Arc > *  fst)
inline

Definition at line 364 of file fstutils.hpp.

template<class Arc >
ComposeFst<Arc> fst::RPhiCompose ( const Fst< Arc > &  fstlhs,
const Fst< Arc > &  fstrhs,
const typename Arc::Label  kSpecialLabel 
)

Performs composition with PHI, based on OpenFST matchers PHI transitions are expected on fstrhs.

Parameters
fstlhsleft FST
fstrhsright FST, potentially using kPhiLabel
kSpecialLabelspecial Failure transition label phi (recommend to use PHI, see ../include/global_decls.hpp)

Definition at line 35 of file fstutils.ftcompose.hpp.

Here is the caller graph for this function:

template<class Arc >
ComposeFst<Arc> fst::RRhoCompose ( const VectorFst< Arc > &  fstlhs,
const VectorFst< Arc > &  fstrhs,
const typename Arc::Label  kSpecialLabel = RHO 
)
inline

Performs composition with RHO, based on OpenFST matchers RHO transitions are expected on fstrhs.

Parameters
fstlhsleft FST
fstrhsright FST, potentially using kPhiLabel
kSpecialLabelspecial Failure transition label rho (recommend to use RHO, see ../include/global_decls.hpp)

Definition at line 55 of file fstutils.ftcompose.hpp.

Here is the caller graph for this function:

void fst::SetFinalStateCost ( fst::MutableFst< fst::StdArc > *  fst,
const fst::StdArc::Weight  cost 
)
inline

Definition at line 445 of file fstutils.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned fst::ShortestPathLength ( const fst::VectorFst< fst::StdArc > *  fst)
inline

Definition at line 347 of file fstutils.hpp.

Here is the caller graph for this function:

fst::VectorFst<fst::LogArc>* fst::StdToLog ( const fst::VectorFst< fst::StdArc > *  fst)
inline

Definition at line 371 of file fstutils.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Arc >
void fst::string2fst ( const std::string &  sidxwords,
fst::VectorFst< Arc > *  fst,
const std::string &  tidxwords = "",
typename Arc::Weight  finalweight = Arc::Weight::One() 
)
inline

Convenience method that creates an fsa/fst from one/two string(s) of numbers.

Parameters
sidxwords: source sequence of words (numbers)
fst: Output fst.
tidxwords: target sequence of words (numbers)
finalweight: Weight of the fst.

Definition at line 463 of file fstutils.hpp.

template<class T >
TropicalSparseTupleWeight< T > fst::Times ( const TropicalSparseTupleWeight< T > &  w1,
const TropicalSparseTupleWeight< T > &  w2 
)
inline

Definition at line 163 of file fsttools/include/tropical-sparse-tuple-weight.h.

Here is the caller graph for this function:

template<class Arc >
VectorFst<Arc>* fst::VectorFstRead ( const std::string &  filename)
inline

Templated method that reads VectorFst.

Parameters
filenamebinary [file] to read from.
Returns
pointer VectorFst<StdArc>.

Definition at line 78 of file fstio.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float fst::ZPosInfinity ( )
inline

Just a wrapper to maintain compatibility with OpenFST 1.3.1, last version using kPosInfinity constant.

Definition at line 27 of file fstutils.hpp.

Here is the caller graph for this function: