NGRAMSYMBOLS(1)
πΈ NAME πΈ
ngramsymbols β bestie, this is the manual page for ngramsymbols version 1.3.17, and it's lowkey about deriving a symbol table from a corpus. π
β¨ DESCRIPTION β¨
okay so picture this: you hand it a corpus, and it derives a symbol table from it. that's the whole vibe. it's giving "I make symbol tables out of text files" and honestly? iconic. π
the usage is exactly this, no notes:
Usage: ngramsymbols [--options] [in.txt [out.txt]]
so you can pass an input file, and optionally an output file too, plus whatever --options you want. slay. π
π PROGRAM FLAGS π
these are the flags that belong to the program itself, its own little personality traits fr fr:
--OOV_symbolβ type =std::string, default ="<UNK>". this is the class label for OOV symbols. out-of-vocabulary besties get this name and that's just how it is π--epsilon_symbolβ type =std::string, default ="<epsilon>". label for epsilon. yes, epsilon gets its own little nametag π¦
π LIBRARY FLAGS π
these ones come from the library side of things, still important, still eating π
π Flags from: flags.cc
--helpβ type =bool, default =false. show usage information. the classic. the moment. use it when you're lost π--helpshortβ type =bool, default =false. show brief usage information. same energy, shorter, for when you're in a rush β--tmpdirβ type =std::string, default ="/tmp". temporary directory. where the temp files go to hang out π--vβ type =int32_t, default =0. verbosity level. crank it up if you want it to yap more π’
π Flags from: fst.cc
--fst_alignβ type =bool, default =false. write FST data aligned where appropriate. alignment matters, even for data π§--fst_default_cache_gcβ type =bool, default =true. enable garbage collection of cache. it's cleaning up after itself, we love a self-care queen β¨--fst_default_cache_gc_limitβ type =int64_t, default =1048576. the cache byte size that triggers garbage collection. hit that number and the GC clock starts ticking π--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. double-checking the vibe, honestly valid π--save_relabel_ipairsβ type =std::string, default ="". save input relabel pairs to file. note the default is empty, so nothing gets saved unless you say so πΈ--save_relabel_opairsβ type =std::string, default ="". save output relabel pairs to file. same deal, empty default, your call π
π Flags from: ngram-output.cc
--end_symbolβ type =std::string, default ="</s>". class label for sentence end. the periodt of the symbol world π--start_symbolβ type =std::string, default ="<s>". class label for sentence start. main character energy, obviously it goes first π
π Flags from: symbol-table.cc
--fst_compat_symbolsβ type =bool, default =true. require symbol tables to match when appropriate. they gotta match, no cap π€--fst_field_separatorβ type =std::string, default =" ". set of characters used as a separator between printed fields. yeah bestie that default is literally a bunch of spaces, copy it exactly, don't get creative π
π 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(). so like, by default an FST error will absolutely end you π--ngram_error_fatalβ type =bool, default =true. NGram errors are fatal if true; otherwise returns objects flagged as bad: e.g.,NGramModel::Error()is true. same dramatic energy, but for NGram errors π₯
π 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). so it's a size-0-or-2situation, no in-between, periodt β οΈ--fst_weight_separatorβ type =std::string, default =",". character separator between printed composite weights; must be a single character. one character only bestie, don't try to be extra π
π quick vibe check: all thosetype = ...anddefault = ...bits are copy-pasted exactly as they come, so if you're scripting against them, you're safe. no guessing, no improvising, iykyk.
and that's the whole page!! this was ngramsymbols version 1.3.17, dated February 2022, and honestly it ate ππ¦β¨ ily, go derive some symbol tables bestie π
π
π¦ 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