Scroll to navigation

HFST-SUBSTITUTE(1) User Commands HFST-SUBSTITUTE(1)

NAME

hfst-substitute - =Relabel transducer arcs

SYNOPSIS

hfst-substitute [OPTIONS...] [INFILE]

DESCRIPTION

Relabel transducer arcs

Common options:

Print help message
Print version info
Print verbosely while processing
Only print fatal erros and requested output
Alias of --quiet

Input/Output options:

Read input transducer from INFILE
Write output transducer to OUTFILE

Relabeling options:

replace FLABEL
replace with TLABEL
replace with transducer read from TFILE
read replacements from LABELFILE
keep the order of the replacements (with -F)

Input options:

require that transducers in TFILE and INFILE have the same type

Transient optimisation schemes:

-9, --compose
compose substitutions when possible

If OUTFILE or INFILE is missing or -, standard streams will be used. Format of result depends on format of INFILE LABEL must be a symbol name in single arc in transducer, or colon separated pair defining an arc. If TFILE is specified, FLABEL must be a pair. LABELFILE is a 2 column tsv file where col 1 is FLABEL and col 2 gives TLABEL specifications.

EXAMPLES

hfst-substitute -i tr.hfst -o tr_relabeled.hfst -f 'a' -t 'A'
relabel all symbols 'a' with 'A'
hfst-substitute -i tr.hfst -o tr_relabeled.hfst -f 'a:b' -t 'A:B'
relabel all arcs 'a:b' with 'A:B'
hfst-substitute -i tr.hfst -o tr_relabeled.hfst -f 'a:b' -T repl.hfst
replace all arcs 'a:b' with transducer repl.hfst

REPORTING BUGS

Report bugs to <hfst-bugs@helsinki.fi> or directly to our bug tracker at: <https://github.com/hfst/hfst/issues>

hfst-substitute home page: <https://github.com/hfst/hfst/wiki/HfstSubstitute>
General help using HFST software: <https://github.com/hfst/hfst/wiki>

COPYRIGHT

Copyright © 2017 University of Helsinki, License GPLv3: GNU GPL version 3 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

August 2018 HFST