HFST-SFSTPL2FST(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-SFSTPL2FST(1) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about a little tool from the HFST family (that's the User Commands crew, section 1, iykyk) that is genuinely so useful it's not even funny. it's called hfst-sfstpl2fst and it's about to become your new hyperfixation. πŸ¦‹


✨ NAME ✨

hfst-sfstpl2fst β€” =Compile a file written with SFST programming language into a transducer.

yes the = is in there. it came like that. we don't ask questions, we just vibe. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

hfst-sfstpl2fst (alias hfst-calculate) [OPTIONS...] [INFILE]

she also answers to hfst-calculate, so if you call her that, she will respond. main character with two names energy fr fr. πŸ‘‘


🌸 DESCRIPTION 🌸

Compile a file written with SFST programming language into a transducer. that's the whole thing. that's the job. you give her SFST source, she hands you back a transducer, and honestly? slay. πŸ’–

πŸ’« Common options:

  • -h, --help β€” Print help message. she tells you how she works. communication queen.
  • -V, --version β€” Print version info. so you know exactly which era of her you're dealing with.
  • -v, --verbose β€” Print verbosely while processing. she narrates. no thoughts, just updates.
  • -q, --quiet β€” Only print fatal erros and requested output. (yes, "erros". typo is canon, we keep it, periodt.) she goes silent mode but still screams if something's fatal.
  • -s, --silent β€” Alias of --quiet. same girl, different name tag.

πŸ“ Input/Output options:

  • -i, --input=INFILE β€” Read input from INFILE. hand her the file, she reads it.
  • -o, --output=OUTFILE β€” Write output transducer to OUTFILE. she writes it back out. give and take, it's giving healthy relationship. 🫢

πŸ”€ String and format options:

  • -f, --format=FMT β€” Write result in FMT format.

If OUTFILE or INFILE is missing or -, standard streams will be used. so you can absolutely pipe her into things, she loves that.

FMT must be one of the following: {foma, sfst, openfst-tropical, openfst-log}

pick one of those four. not five. not "whatever feels right". those four. πŸŽ€

πŸ”₯ EXAMPLES πŸ”₯

1. the a-through-z machine

echo "[a-z]*" | hfst-sfstpl2fst -f foma > az.foma

create a foma transducer accepting any number of consecutive characters between a and z, inclusive. any number!! including zero!! she's flexible like that. ✨

2. the double-a to b machine

echo "a:b (a:<>)+" > ab.sfst-pl ; hfst-sfstpl2fst -f openfst-tropical \
-i ab.sfst-pl -o ab.tropical

create a tropical OpenFst transducer that accepts two or more consecutive a's and maps them into string "b". two or more, bestie, she said what she said. 🌈


😭 REPORTING BUGS 😭

found a bug? do NOT suffer in silence, that's not the vibe.

hfst-sfstpl2fst home page: <https://github.com/hfst/hfst/wiki/HfstSfstPl2Fst>

General help using HFST software: <https://github.com/hfst/hfst/wiki>


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. like... none. zero. the audacity of software, honestly. πŸ’€ but hey, it's free, so.

so yeah β€” that's hfst-sfstpl2fst, compiled straight from SFST source into a transducer, four whole formats, one iconic alias. this page came from the HFST crew and it's dated August 2018, and it lives in section HFST-SFSTPL2FST(1) of the manual. go make something beautiful with it. mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from