NGRAMPRINT(1)

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

πŸ’– 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 --backoff are 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 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: 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: kError property set, FST weights: not a Member() πŸ’€
  • --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_parentheses has to be size 0 or size 2, and --fst_weight_separator has 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