NGRAMRANDGEN(1)

πŸ“¦
version 1.3.17 Β· 3 versions
, in fedora 44

✨ ngramrandgen β€” the manual page, but make it a vibe ✨

okay bestie, so you found the man page for ngramrandgen (that's the User Commands section of the manual, section 1, iykyk) and honestly? it's giving random sentence generator energy and I am obsessed. let's get into it πŸ’–


🌸 NAME 🌸

ngramrandgen β€” manual page for ngramrandgen 1.3.17 πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

It generates random sentences from an LM. yes literally, that's the whole job. it takes a language model and pulls sentences out of it like a little magician pulling scarves out of a hat, except the scarves are sentences and the hat is an FST. iconic behavior tbh πŸ‘‘

Usage, in all its glory:

ngramrandgen [--options] [in.fst [out.far]]

πŸ’… PROGRAM FLAGS πŸ’…

These are the main character flags, the ones that are actually about this program. slay.

  • --max_length β€” type = int32_t, default = 2147483647. Maximum sentence length. yes, the default is that giant number, so unless you say otherwise it'll basically let the sentence run forever πŸ™ˆ
  • --max_sents β€” type = int64_t, default = 1. Maximum number of sentences to produce. one (1) sentence by default, a true minimalist πŸŽ€
  • --remove_epsilon β€” type = bool, default = false. Remove epsilons from generated strings ✨
  • --remove_total_weight β€” type = bool, default = false. Remove total weight when output weighted πŸ’œ
  • --seed β€” type = int32_t, default = 1768688629. Random seed. so you can make the randomness reproducible, which is the least chaotic thing in this whole page πŸ“
  • --weighted β€” type = bool, default = false. Output tree weighted by sentence count vs. unweighted sentences πŸ”₯

🌈 LIBRARY FLAGS 🌈

okay so now we get into the flags that come from the shared library situation. these show up all over the place, they're like the group chat members who are in every single conversation. still gotta list every one of them though, no skipping, periodt.

⭐ Flags from: flags.cc

  • --help β€” type = bool, default = false. show usage information πŸ™‹
  • --helpshort β€” type = bool, default = false. show brief usage information
  • --tmpdir β€” type = std::string, default = "/tmp". temporary directory
  • --v β€” type = int32_t, default = 0. verbosity level. crank it up if you want the program to talk to you more πŸ’¬

πŸ’– Flags from: fst.cc

  • --fst_align β€” type = bool, default = false. Write FST data aligned where appropriate
  • --fst_default_cache_gc β€” type = bool, default = true. Enable garbage collection of cache. it's already on by default, very self-care of it 🫢
  • --fst_default_cache_gc_limit β€” type = int64_t, default = 1048576. Cache byte size that triggers garbage collection
  • --fst_read_mode β€” type = std::string, default = "read". Default file reading mode for mappable files
  • --fst_verify_properties β€” type = bool, default = false. Verify FST properties queried by TestProperties
  • --save_relabel_ipairs β€” type = std::string, default = "". Save input relabel pairs to file
  • --save_relabel_opairs β€” type = std::string, default = "". Save output relabel pairs to file

πŸŽ€ Flags from: symbol-table.cc

  • --fst_compat_symbols β€” type = bool, default = true. Require symbol tables to match when appropriate
  • --fst_field_separator β€” type = std::string, default = " ". Set of characters used as a separator between printed fields (yes bestie, that default is literally a string of spaces, no cap 😭)

🧚 Flags from: util.cc

  • --fst_error_fatal β€” type = bool, default = true. FST errors are fatal; o.w. return objects flagged as bad: e.g., FSTs: kError property set, FST weights: not a Member()
heads up, this one defaults to true, which means errors are FATAL unless you turn it off. dramatic? yes. accurate? also yes πŸ’€

πŸ“ Flags from: weight.cc

  • --fst_weight_parentheses β€” type = std::string, default = "". 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)
  • --fst_weight_separator β€” type = std::string, default = ",". Character separator between printed composite weights; must be a single character
not me stressing the constraints here: --fst_weight_parentheses has to be size 0 or 2, and --fst_weight_separator has to be exactly one character. no in-between, no vibes-based sizes πŸ™ˆ

and that's the whole page, bestie!! every flag, every type, every default, all accounted for, nothing left behind πŸ’–

this little masterpiece is ngramrandgen 1.3.17, dated February 2022, living its life as NGRAMRANDGEN(1) in the manual. go forth and generate some random sentences, you absolute icon πŸ‘‘βœ¨πŸ’…

πŸ“¦ where this page comes from