My favorites | Sign in
Project Home Issues Source
Search
for
EvaluateNgram  

Featured
Updated Feb 4, 2010 by bojune...@gmail.com

Syntax for MITLM v0.3 and older can be found at EvaluateNgramV01.

evaluate-ngram

NAME

evaluate-ngram - Evaluates the performance of an n-gram language model.

SYNOPSIS

evaluate-ngram [Options]

DESCRIPTION

Evaluates the performance of an n-gram language model. It also supports various n-gram language model conversions, including changes in order, vocabulary, and file format.

Filename argument can be an ASCII file, a compressed file (ending in .Z or .gz), or '-' to indicate stdin/stdout.

OPTIONS

-h, -help Print this message.
-verbose (1) Set verbosity level.
-o, -order (3) Set the n-gram order of the estimated LM.
-v, -vocab Fix the vocab to only words from the specified file.
-l, -lm Load specified LM.
-cl, -compile-lattices SLS Compiles lattices into a binary format.
-ep, -eval-perp Compute test set perplexity.
-ew, -eval-wer Compute test set lattice word error rate.
-em, -eval-margin Compute test set lattice margin.
-wb, -write-binary Write LM/counts files in binary format.
-wv, -write-vocab Write LM vocab to file.
-wl, -write-lm Write ARPA backoff LM to file.

EXAMPLES

Compute the perplexity of an n-gram LM on a text file.

evaluate-ngram -lm input.lm -eval-perp test.txt

Convert a trigram model to a bigram LM.

evaluate-ngram -lm input.lm -order 2 -write-lm output.lm

Convert a binary n-gram LM to ARPA text format.

evaluate-ngram -lm input.blm -write-lm output.lm
Powered by Google Project Hosting