FST  openfst-1.7.7
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/rmepsilon.h>
5 
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 
21 
22 } // namespace script
23 } // namespace fst
bool WeightTypesMatch(const WeightClass &weight, const std::string &op_name) const
Definition: fst-class.cc:82
REGISTER_FST_OPERATION_3ARCS(Compress, CompressArgs)
const WeightClass & weight_threshold
Definition: rmepsilon.h:22
const std::string & ArcType() const final
Definition: fst-class.h:300
void RmEpsilon(RmEpsilonArgs *args)
Definition: rmepsilon.h:99
constexpr uint64 kError
Definition: properties.h:36
void SetProperties(uint64 props, uint64 mask)
Definition: fst-class.h:467
std::pair< MutableFstClass *, const RmEpsilonOptions & > RmEpsilonArgs
Definition: rmepsilon.h:96