---+ NGramPrint ---++ Description * By default, only n-grams are printed (without backoff _<epsilon>_ transitions), in the same format as discussed above for reading in n-gram counts: _w<sub>1</sub> ... w<sub>k</sub> score_, where the score will be either the n-gram count or the n-gram probability, depending on whether the model has been normalized. By default, scores are converted from the internal negative log representation to real semiring counts or probabilities. * By using the flag _--ARPA_, the n-gram model is printed in the well-known ARPA format. * By using the flag _--backoff_, backoff _<epsilon>_ transitions are printed along with the n-grams. * By using the flag _--negativelogs_, scores are shown as negative logs, rather than being converted to the real semiring. * By using the flag _--integers_, scores are converted to the real semiring and rounded to integers. For writing n-gram counts and ARPA format models, tokens _<s>_ and _</s>_ are used to represent start-of-sequence and end-of-sequence, respectively. Neither of these symbols are used in our automaton format. For the precise details of the n-gram format, see [[NGramModelFormat][here]]. ---++ Usage |<verbatim> ngramprint [--options] [in.fst [out.txt]] --ARPA: type = bool, default = false --backoff: type = bool, default = false --integers: type = bool, default = false --negativelogs: type = bool, default = false </verbatim>|| ---++ Examples <verbatim> $ ngramprint --ARPA in.mod >out.ARPA-format.txt </verbatim> ---++ Caveats ---++ References
This topic: GRM
>
WebHome
>
NGramLibrary
>
NGramQuickTour
>
NGramPrint
Topic revision: r4 - 2012-03-04 - BrianRoark
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback