fstreplace(1)

πŸ’– fstreplace(1) πŸ’–

okay bestie, so like β€” this is the manual page for fstreplace, which lives in the User Commands section of the manual. yes you read that right, section 1, the "run me from your shell" section. she's a command, not a library, not a syscall, a whole command. iconic behavior tbh πŸŽ€


✨ NAME ✨

fstreplace β€” replace FST arcs with other FSTs πŸ’…

like. that's the whole vibe. you take arcs. you swap them out. other FSTs go in. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

fstreplace [OPTIONS] root.fst rootlabel [rule.fst label...]  [out.fst]]

okay so notice the double space before [out.fst]] β€” that's not me being chaotic, that's literally what it says. and yes there IS a mystery extra ] at the very end. she's mysterious. she's quirky. we love her. πŸ™ˆ


🌸 DESCRIPTION 🌸

Performs dynamic replacement of arcs in one FST with another FST, allowing for the definition of FSTs analogous to RTNs.

okay translating that into bestie-speak: it does the arc-swap thing at runtime, which means you can build FSTs that act like RTNs. recursive transition networks!! the fancy ones!! and honestly? not me being obsessed with dynamic replacement. that's the whole point of the tool and it ATE. πŸ”₯


πŸ‘‘ OPTIONS πŸ‘‘

quick housekeeping before we get into the menu, because this matters:

Boolean options accept either true or false as a value, or the implicit value true if neither value is specified. so like, if you just write the flag with nothing after it, she assumes true. periodt. πŸ’…

  • --call_arc_labeling=STRING β€” Which labels to make non-epsilon on the call arc. your choices are exactly "input", "output", "both", and "neither". Default: "input". so by default the input side gets to be non-epsilon, okurrr πŸ’–
  • --epsilon_on_replace[=BOOLEAN] β€” this one is here for backwards compatibility: call/return arcs are epsilon arcs. Default: false.
  • --fst_align[=BOOLEAN] β€” Write FST data aligned where appropriate. alignment!! structure!! Default: false.
  • --fst_compat_symbols[=BOOLEAN] β€” Require symbol tables to match when appropriate. Default: true. she's strict about symbols and honestly? respect. 🫢
  • --fst_default_cache_gc[=BOOLEAN] β€” Enable garbage collection of cache. Default: true. take out the trash bestie πŸ—‘οΈβœ¨
  • --fst_default_cache_gc_limit=N β€” Set the cache byte size that triggers garbage collection. Default: 1048576. that's a very specific number and I would not mess with it, fr fr.
  • --fst_error_fatal[=BOOLEAN] β€” If true, FST errors are fatal. Otherwise, returned objects are flagged as bad. For example, FSTs are returned with the kError property set to true, and FST weights set so that Member() returns false. Default: true. so heads up β€” by default an error is NOT a vibe check survival situation, it's fatal. πŸ’€
  • --fst_field_separator=STRING β€” Set the characters used as a separator between printed fields. Default: " ". yes that's five spaces in the quotes, keep them, don't touch them, she's sensitive πŸ₯Ί
  • --fst_read_mode=STRING β€” Set the default file reading mode for mappable files. your two options are literally either "read" or "map". Default: "read".
  • --fst_verify_properties[=BOOLEAN] β€” Verify fst properties queried by TestProperties. Default: false.
  • --fst_weight_parentheses=STRING β€” Set the characters enclosing the first weight of a printed composite weight (e.g., pair weight, tuple weight, and derived classes) to ensure proper I/O of nested composite weights. Must have size 0 (none) or 2 (open and close parenthesis). Default: no parentheses. so like β€” it's strictly 0 or strictly 2 characters, there is no in-between, she does not do half measures 🌈
  • --fst_weight_separator=CHARACTER β€” Set the character separator between printed composite weights. Default: comma.
  • --help[=BOOLEAN] β€” Show usage information. Default: false. hi bestie, you're already reading the manual but go off πŸ‘‘
  • --helpshort[=BOOLEAN] β€” Show brief usage information. Default: false. the TL;DR version ✨
  • --return_arc_labeling=STRING β€” Which labels to make non-epsilon on the return arc. one of "input", "output", "both", and "neither". Default: "neither". (yes, different default from the call arc, stay woke πŸ‘€)
  • --return_label=INTEGER β€” Label to put on return arc. Default: 0.
  • --save_relabel_ipairs=FILENAME β€” Save input relabel pairs to file. Default: do not save.
  • --save_relabel_opairs=FILENAME β€” Save output relabel pairs to file. Default: do not save.
  • --tmpdir=PATHNAME β€” Set the temporary directory to use. Default: /tmp.
  • --v[=N] β€” Set the verbosity level. Default: 0. crank it up if you want her to yap more πŸ—£οΈ

🌈 SEE ALSO 🌈

the whole friend group, and yes they all showed up to the party. go read them too, no cap:

fstarcsort(1), fstclosure(1), fstcompile(1), fstcompose(1), fstcompress(1), fstconcat(1), fstconnect(1), fstconvert(1), fstdeterminize(1), fstdifference(1), fstdisambiguate(1), fstdraw(1), fstencode(1), fstepsnormalize(1), fstequal(1), fstequivalent(1), fstinfo(1), fstintersect(1), fstinvert(1), fstisomorphic(1), fstlinear(1), fstloglinearapply(1), fstmap(1), fstminimize(1), fstprint(1), fstproject(1), fstprune(1), fstpush(1), fstrandgen(1), fstrelabel(1), fstreverse(1), fstreweight(1), fstrmepsilon(1), fstshortestdistance(1), fstshortestpath(1), fstsymbols(1), fstsynchronize(1), fsttopsort(1), fstunion(1)


okay that's the whole thing!! mwah πŸ’‹

and for the credits moment, because everyone deserves their flowers β€” this page is from OpenFst 1.8.5, dated Mar 2026. she's fresh, she's current, she's the moment. bye bestie, go replace some arcs πŸ’–πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from