NGRAMRANDGEN(1)
β¨ 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 byTestProperties--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:kErrorproperty set, FST weights: not aMember()
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 size0(none) or2(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_parentheseshas to be size0or2, and--fst_weight_separatorhas 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
- fedora 44: opengrm-ngram-tools 1.3.17-2.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms