hfst-reverse

Purpose

Reverse a transducer. Iff the original transducer accepts string [s0 s1 s2 ... sN], the reversed transducer will accept string [sN s(N-1) s(N-2) ... s0].

Usage

The help message:

Usage: hfst-reverse [OPTIONS...] [INFILE]
Reverse 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

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

Report bugs to <hfst-bugs@helsinki.fi> or directly to our bug tracker at:
<https://sourceforge.net/tracker/?atid=1061990&group_id=224521&func=browse>

Examples

$ echo "star
> racecar
> won" | hfst-strings2fst -j -f sfst | hfst-reverse | hfst-fst2strings
rats
racecar
now

-- ErikAxelson - 09 Jul 2008