NGRAMPRINT(1)
π NGRAMPRINT β¨
okay bestie, gather round, because this one is ngramprint, the manual page for ngramprint 1.3.17, and she's giving very useful tool. no cap. π«Ά
πΈ DESCRIPTION πΈ
She prints n-gram counts and models. that's it, that's the whole vibe. iconic.
Usage: ngramprint [--options] [in.fst [out.txt]]
like, you feed her an input FST (and optionally a place to dump the output text) and she does her lil thing. main character energy fr fr. π
π PROGRAM FLAGS π
these are her flags, the ones that make her special. let's go one by one, no skipping, we don't do that here π
--ARPAβ type =bool, default =false. print in ARPA format β¨--backoffβ type =bool, default =false. show epsilon backoff transitions when printing π--backoff_inlineβ type =bool, default =false. show epsilon backoffs transitions inline with context as a third field, but only if--backoffare being printed π¦--backoff_labelβ type =int64_t, default =0. the backoff label π·οΈ--check_consistencyβ type =bool, default =false. check model consistency π--context_patternβ type =std::string, default ="". pattern of contexts to print π―--include_all_suffixesβ type =bool, default =false. include suffixes of contexts π--integersβ type =bool, default =false. show just integer counts when printing π’--negativelogsβ type =bool, default =false. show negative log probs/counts when printing π--symbolsβ type =std::string, default ="". symbol table file. if not empty, it causes it to be loaded from the specified file instead of using the one inside the input FST π
π LIBRARY FLAGS π
these are the shared ones, the group-chat members who show up in every project lol.
β¨ 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 π
π¦ 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 π§Ή--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: ngram-output.cc π
--end_symbolβ type =std::string, default ="</s>". class label for sentence end π--start_symbolβ type =std::string, default ="<s>". class label for sentence start π
πΈ 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 βοΈ
π§ 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()π--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 π
β 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 π
ok lowkey important bestie: a couple of these say "must" and they MEAN it.--fst_weight_parentheseshas to be size 0 or size 2, and--fst_weight_separatorhas to be exactly one character. not me being dramatic, that's just what it says. π
and that's the whole page, bestie!! π₯³ you now know ngramprint 1.3.17 better than half the internet. this manual page was served up from User Commands and dated February 2022, so go forth and print those n-gram counts like the queen you are. mwah. πβ¨π
π¦ 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