NGRAMCONTEXT(1)
π 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 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.
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 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.
Heads up bestie:--fst_weight_parenthesesmust be size0or2, and--fst_weight_separatormust 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
- 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