LM Util
The lm-util binary performns various language model related tasks. The action to perform is passed via the action parameter.
Valid actions are:
load-lm: Loads and initializes a language model. Can be usefull for LMs where initializing the model has side-effects, like the ARPA LM, which creates an image file.- Sub-components:
lexicon: lexicon for the languagemodellm: configuration for the Language Model
compute-perplexity-from-text-file: Compute the perplexity of a LM on a text file.- Parameters:
file: input fileencoding: the encoding of the input filescore-file: output path for word scoresbatch-size: number of sequences to process in one batchrenormalize: wether to renormalize the word probabiliies
- Sub-components:
lexicon: lexicon for the languagemodellm: configuration for the Language Model
Example call:
lm-util \
--*.action=compute-perplexity-from-text-file \
--*.lm.type=ARPA \
--*.lm.image=models/lm.image \
--*.lexicon.file=models/recognition.lex.xml.gz \
--file=my-text-file \
--score-file=scores.txt