Transform an unweighted transducer to a weighted one. All weights are initialised to zero (in the tropical semiring).


hfst-unweighted2weighted [OPTIONS...] [INFILE]


Parameters common for all commandline programs.

-h, --help Print help message
-V, --version Print version info
-v, --verbose Print verbosely while processing
-q, --quiet Do not print output
-s, --silent Alias of --quiet

Parameters common for all commandline programs taking one input stream and writing transducers or text as output.

-i, --input=FILENAME Read input from FILENAME
-o, --output=FILENAME Write output to FILENAME


The input is read one transducer at a time. Each input transducer is transformed to a transducer in text format. The transducer in text format is transformed again to a binary transducer (a zero-weighted weighted one). This transducer is written to the output.

The input

The input may either come from a file or STDIN (depending on, if the parameter input is used or not). In both cases the input consists of unweighted transducers.

The output

The output may either be written to a file or STDOUT (depending on, if the parameter output is used or not). In both cases the output consists of weighted transducers written one after another.


The program is distributed with a Makefile. Calling make install will create all HFST command line tools, including hfst-unweighted2weighted.

Obtaining the program

The program may be obtained from the CVS-repository on the server corpus.csc.fi.

-- ErikAxelson - 10 Jul 2008

Topic revision: r5 - 2012-04-10 - ErikAxelson
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback