NGRAMCONTEXT(1)

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

πŸŽ€ NAME πŸŽ€

ngramcontext β€” bestie, this is the manual page for ngramcontext version 1.3.17 πŸ’–


✨ DESCRIPTION ✨

Okay so picture this: ngramcontext generates a context set from an input LM. That's the whole vibe. It takes your language model and cooks up a context set from it, no cap πŸ‘‘

Here's how you actually run it:

Usage: ngramcontext [--options] [in.fst] [out.fst]

Slay. Now let's get into the flags, because there are a lot of them and honestly? They ate 🫢


πŸ’… PROGRAM FLAGS πŸ’…

These ones are the program's own, the main character flags 🌟

  • --bigram_threshold β€” type = double, default = 1.1. Bin overfill to force a bigram context split.
  • --contexts β€” type = int64_t, default = 1. Number of desired contexts. That's it, that's the dream ✨

πŸ“š LIBRARY FLAGS πŸ“š

Now we're in the library zone, and there are a bunch of different source files contributing flags. Buckle up bestie, we're going file by file πŸ’€

🌸 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.
Not me pointing out that these two are literally the "do you want it to explode or do you want it flagged as bad" switches 😭 Both default to true, so by default? Fatal. Periodt.

🧚 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.
Heads up bestie: --fst_weight_parentheses must be size 0 or 2, and --fst_weight_separator must be a single character. No in-between, no chaos, the rules are the rules πŸ’…

And that's the whole page, angel! This was ngramcontext version 1.3.17, dated February 2022. Go forth and generate those context sets, you absolute icon πŸ’œβœ¨

πŸ“¦ where this page comes from