logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hfst-substitute - =Relabel transducer arcs

Description

       Relabel transducer arcs

   Commonoptions:-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 --quietInput/Outputoptions:-i, --input=INFILE
              Read input transducer from INFILE

       -o, --output=OUTFILE
              Write output transducer to OUTFILE

   Relabelingoptions:-f, --from-label=FLABEL
              replace FLABEL

       -t, --to-label=TLABEL
              replace with TLABEL

       -T, --to-transducer=TFILE
              replace with transducer read from TFILE

       -F, --from-file=LABELFILE
              read replacements from LABELFILE

       -R, --in-order
              keep the order of the replacements (with -F)

   Inputoptions:-C, --do-not-convert
              require that transducers in TFILE and INFILE have the same type

   Transientoptimisationschemes:-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

Name

       hfst-substitute - =Relabel transducer arcs

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>

Synopsis

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

See Also