HFST-SUBSTITUTE(1)

πŸ“¦
version 3.17.1 Β· 2 versions
  • 3.17.1 Β· debian bookworm, debian trixie, nixos 26.05, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 3.17.3 Β· nixpkgs unstable
, in debian bookworm, debian trixie, nixos 26.05, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… hfst-substitute β€” the girlies' guide to hfst-substitute(1)

okay bestie, pull up a chair because this is a User Commands classic and it's about to be your new fave. this is hfst-substitute(1), and no cap, it does exactly one iconic thing and does it well. πŸŽ€


✨ NAME ✨

hfst-substitute β€” =Relabel transducer arcs πŸ’–

(yes, the = is in the original, we do not question the ancestors, we simply respect them πŸ‘‘)


✨ SYNOPSIS ✨

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

✨ DESCRIPTION ✨

Relabel transducer arcs. that's the whole vibe. you feed it a transducer, you tell it what to change and what to change it to, and it hands you back a transducer with the arcs relabeled. obsessed. 🌸

🫢 Common options:

  • -h, --help β€” Print help message. your emotional support flag fr fr.
  • -V, --version β€” Print version info. in case you need to know exactly which era of HFST you're living in.
  • -v, --verbose β€” Print verbosely while processing. she talks through it, and honestly? we love that for her.
  • -q, --quiet β€” Only print fatal erros and requested output. (that typo is heritage, bestie, don't touch it πŸ’€)
  • -s, --silent β€” Alias of --quiet. same energy, different name. main character but undercover.

πŸ¦‹ Input/Output options:

  • -i, --input=INFILE β€” Read input transducer from INFILE. bring her in πŸ’œ
  • -o, --output=OUTFILE β€” Write output transducer to OUTFILE. send her out into the world ✨

πŸ’… Relabeling options:

  • -f, --from-label=FLABEL β€” replace FLABEL. this is the thing you're hunting for.
  • -t, --to-label=TLABEL β€” replace with TLABEL. this is the glow-up you're giving it.
  • -T, --to-transducer=TFILE β€” replace with transducer read from TFILE. not a label, a whole entire transducer. it's giving upgrade.
  • -F, --from-file=LABELFILE β€” read replacements from LABELFILE. bulk mode. efficient queen. πŸ“
  • -R, --in-order β€” keep the order of the replacements (with -F). respect the queue, periodt.

🌈 Input options:

  • -C, --do-not-convert β€” require that transducers in TFILE and INFILE have the same type. she does NOT want to do conversions today. πŸ™ˆ

⭐ Transient optimisation schemes:

  • -9, --compose β€” compose substitutions when possible. speedrun strats, iykyk.

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.

like, read that twice, it's load-bearing bestie 😭


✨ EXAMPLES ✨

hfst-substitute -i tr.hfst -o tr_relabeled.hfst -f 'a' -t 'A'

relabel all symbols 'a' with 'A' β€” the little letters get the big letter treatment πŸ”₯

hfst-substitute -i tr.hfst -o tr_relabeled.hfst -f 'a:b' -t 'A:B'

relabel all arcs 'a:b' with 'A:B' β€” pair goes in, pair comes out, symmetric slay πŸ’–

hfst-substitute -i tr.hfst -o tr_relabeled.hfst -f 'a:b' -T repl.hfst

replace all arcs 'a:b' with transducer repl.hfst β€” full arc replacement, we're not playing around πŸ’…


✨ REPORTING BUGS ✨

found something cursed? don't suffer in silence, tell the devs 🫢

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


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. (no cap, there is genuinely no warranty, she's free and she's honest about it πŸ’€)


and that's the whole page, bestie! πŸŽ€ this drop is from the HFST squad, August 2018 edition β€” go relabel something gorgeous. bye babes πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from