FST  openfst-1.7.1
OpenFst Library
rmepsilon.cc
Go to the documentation of this file.
1 // See www.openfst.org for extensive documentation on this weighted
2 // finite-state transducer library.
3 
4 #include <fst/script/fst-class.h>
5 #include <fst/script/rmepsilon.h>
7 
8 namespace fst {
9 namespace script {
10 
12  if (!fst->WeightTypesMatch(opts.weight_threshold, "RmEpsilon")) {
14  return;
15  }
16  RmEpsilonArgs args(fst, opts);
17  Apply<Operation<RmEpsilonArgs>>("RmEpsilon", fst->ArcType(), &args);
18 }
19 
23 
24 } // namespace script
25 } // namespace fst
bool WeightTypesMatch(const WeightClass &weight, const string &op_name) const
Definition: fst-class.cc:93
const WeightClass & weight_threshold
Definition: rmepsilon.h:21
void RmEpsilon(RmEpsilonArgs *args)
Definition: rmepsilon.h:98
const string & ArcType() const final
Definition: fst-class.h:290
REGISTER_FST_OPERATION(Compress, StdArc, CompressArgs)
constexpr uint64 kError
Definition: properties.h:33
void SetProperties(uint64 props, uint64 mask)
Definition: fst-class.h:452
std::pair< MutableFstClass *, const RmEpsilonOptions & > RmEpsilonArgs
Definition: rmepsilon.h:95