Calculate the properties of a transducer.


The help message:

Usage: hfst-summarize [OPTIONS...] [INFILE]
Calculate the properties of a transducer

Common options:
  -h, --help             Print help message
  -V, --version          Print version info
  -v, --verbose          Print verbosely while processing
  -q, --quiet            Only print fatal erros and requested output
  -s, --silent           Alias of --quiet
Input/Output options:
  -i, --input=INFILE     Read input transducer from INFILE
  -o, --output=OUTFILE   Write output transducer to OUTFILE
Summarize options:
  -S, --print-symbol-pair-statistics=N  Print info about symbol pairs that occur
                                        at most N times (default is infinity)

If OUTFILE or INFILE is missing or -, standard streams will be used.
Format of result depends on format of INFILE

The parameter --verbose gives more extensive information on
the properties of a transducer.

Report bugs to <hfst-bugs@helsinki.fi> or directly to our bug tracker at:


If we create a simple transducer that maps "a" to "b" and want to see how many states it has, we can use the tools hfst-summarize and grep to get the piece of information that we are interested of:

echo "a" | hfst-sfstpl2fst -f openfst-tropical | hfst-summarize | grep "# of states"

The commands above would then print to standard output:

# of states: 2

If we want to know the alphabet of the transducer, we can use the option --verbose:

echo "a" | hfst-sfstpl2fst -f openfst-tropical | hfst-summarize --verbose | tail -8

Reading from <stdin>, writing to <stdout>
sigma set:
arc symbols actually seen in transducer:
sigma symbols missing from transducer:

Read 1 transducers in total.

-- ErikAxelson - 09 Jul 2008