39 unordered_set<typename Arc::Label> epsilons =
46 fst::VectorFst<Arc> *mfst = VectorFstRead<Arc> (pi (ir->get() ) );
48 fst::Map<Arc, WordPenaltyMapper<Arc> > (mfst,
50 if (shp < std::numeric_limits<unsigned>::max() ) {
51 fst::VectorFst<Arc> aux;
52 fst::ShortestPath<Arc> (*mfst, &aux, shp);
55 std::string auxs = po (ir->get() );
57 ucam::util::toString<float> (wp() ) );
58 FstWrite<Arc> (*mfst, auxs);
65 int main (
int argc,
const char* argv[] ) {
69 FORCELINFO ( rg.
dump (
"CONFIG parameters:\n=====================",
70 "=====================" ) ) ;
std::string const kHifstSemiring
int main(int argc, const char *argv[])
class that expands a wildcard into its actual value. This is useful e.g. for filenames ranging severa...
std::string const kEpsilonLabels
VectorFst< Arc > * VectorFstRead(const std::string &filename)
Templated method that reads VectorFst.
templated Mapper that inserts a word penalty over an FST, skipping user defined epsilon arcs...
NumberType get(void)
Returns range value at position k_.
Included headers for all the binary should be defined here. This file should be included only once...
unordered_set< NumberT > getSetNumber(const std::string &key) const
Templated method that returns a set of numbers taking "," as the separator character.
TuneWpMain(ucam::util::RegistryPO const &rg)
T get(const std::string &key) const
Returns parsed value associated to key.
void initLogger(int argc, const char *argv[])
Inits logger, parses param options checking for –logger.verbose.
boost::scoped_ptr< NumberRangeInterface< unsigned > > IntRangePtr
std::string const kOutput
void start(void)
Empty implementation.
void next(void)
Increment index.
std::string const kHifstSemiringLexStdArc
std::string const kHifstSemiringStdArc
Static variables for logger. Include only once from main file.
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.
Templated functor that creates a weight given a float.
std::string const kWordPenalty
std::string dump(const std::string &decorator_start="", const std::string &decorator_end="")
Dumps all configuration parameters into a string with a reasonably pretty format. ...
bool done(void)
Checks if reached the last element.
void find_and_replace(std::string &haystack, const std::string &needle, const std::string &replace)
const std::string kRangeOne
Static variable for custom_assert. Include only once from main file.