NGRAMPERPLEXITY(1)
β¨ NAME β¨
ngramperplexity β bestie, this is the manual page for ngramperplexity version 1.3.17, and it's giving "apply n-gram model to input FST archive" π
πΈ DESCRIPTION πΈ
Okay so here's the vibe: you take an n-gram model and you apply it to an input FST archive. That's the whole main character moment.
Usage goes a lil something like this:
ngramperplexity [--options] ngram.fst [in.far [out.txt]]
π PROGRAM FLAGS π
These are the flags that belong to the program itself, no cap:
--OOV_class_sizeβ type =double, default =10000. This is how many members are in the OOV class π«Ά--OOV_probabilityβ type =double, default =0. The unigram probability for OOVs, fr fr.--OOV_symbolβ type =std::string, default ="". The existing symbol for the OOV class, periodt.--context_patternβ type =std::string, default ="". Restricts the perplexity computation to only the contexts defined by the pattern (default: no restriction at all, live your life π).--use_phimatcherβ type =bool, default =false. Use phi matcher and composition β¨
π LIBRARY FLAGS π
Now for the library side of things, iykyk.
π Flags from: compile-strings.cc
--far_field_separatorβ type =std::string, default = a literal newline character (yes, the default is actually a line break between the quotes π). It's the set of characters used as a separator between printed fields.
π¦ 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". The temporary directory π--vβ type =int32_t, default =0. Verbosity level, bestie.
β 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. The 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 a file.--save_relabel_opairsβ type =std::string, default ="". Save output relabel pairs to a file.
π Flags from: ngram-output.cc
--end_symbolβ type =std::string, default ="</s>". The class label for sentence end.--start_symbolβ type =std::string, default ="<s>". The 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 =" "(that's literally a run of spaces, exactly as printed π). It's the 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; otherwise 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 it returns objects flagged as bad, e.g.,NGramModel::Error()is true.
π
Flags from: weight.cc
--fst_weight_parenthesesβ type =std::string, default ="". These are the characters enclosing the first weight of a printed composite weight (think pair weight, tuple weight and derived classes) to ensure proper I/O of nested composite weights. Heads up: it must have size0(none) or2(open and close parenthesis) β no in-between, bestie.--fst_weight_separatorβ type =std::string, default =",". The character separator between printed composite weights, and ngl it must be a single character.
And that's the whole page, bestie β go compute some perplexity, you're gonna slay πβ¨
Sign-off moment: this was ngramperplexity 1.3.17, dated February 2022. Take care of her, she's iconic π
π¦ 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