Commit 868139e6 authored by Dan Povey's avatar Dan Povey
Browse files

trunk: minor commmit: improvements to usage messages.

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4215 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 18e4ff2c
// bin/get-post-on-ali.cc
// Copyright 2013 Brno University of Technology (Author: Karel Vesely)
// 2014 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
......@@ -31,18 +32,24 @@ int main(int argc, char *argv[]) {
typedef kaldi::int32 int32;
try {
const char *usage =
"This program extracts a vector of per-frame posteriors that are selected\n"
"by an alignment (ie. posteriors that are under the alignment path).\n"
"This can be used as a per-frame confidence measure.\n"
"Given input posteriors, e.g. derived from lattice-to-post, and an alignment\n"
"typically derived from the best path of a lattice, outputs the probability in\n"
"the posterior of the corresponding index in the alignment, or zero if it was\n"
"not there. These are output as a vector of weights, one per utterance.\n"
"While, by default, lattice-to-post (as a source of posteriors) and sources of\n"
"alignments such as lattice-best-path will output transition-ids as the index,\n"
"it will generally make sense to either convert these to pdf-ids using\n"
"post-to-pdf-post and ali-to-pdf respectively, or to phones using post-to-phone-post\n"
"and (ali-to-phones --per-frame=true). Since this program only sees the integer\n"
"indexes, it does not care what they represent-- but of course they should match\n"
"(e.g. don't input posteriors with transition-ids and alignments with pdf-ids).\n"
"See http://kaldi.sourceforge.net/hmm.html#transition_model_identifiers for an\n"
"explanation of these types of indexes.\n"
"\n"
"By intuition, it is better to use pdf-posteriors and pdf-alignments,\n"
"because the posteriors of competing hypothesis that are in the same frame\n"
"at same 'pdf-state' are summed up, which is in some sense similar\n"
"to what is done by C-max which sums the posteriors of overlapping words.\n"
"The difference here is that the granularity is per-frame.\n"
"See also: weight-post, post-to-weights, reverse-weights\n"
"\n"
"Usage: get-post-on-ali [options] <posteriors-rspecifier> <ali-rspecifier> <conf-wspecifier>\n"
"e.g.: get-post-on-ali ark:post.ark ark:ali.ark ark:conf.ark\n";
"Usage: get-post-on-ali [options] <posteriors-rspecifier> <ali-rspecifier> <weights-wspecifier>\n"
"e.g.: get-post-on-ali ark:post.ark ark,s,cs:ali.ark ark:weights.ark\n";
ParseOptions po(usage);
......
......@@ -32,6 +32,7 @@ int main(int argc, char *argv[]) {
const char *usage =
"This program turns per-frame posteriors, which have transition-ids as\n"
"the integers, into pdf-level posteriors\n"
"See also: post-to-phone-post, post-to-weights, get-post-on-ali\n"
"\n"
"Usage: post-to-pdf-post [options] <model-file> <posteriors-rspecifier> <posteriors-wspecifier>\n"
"e.g.: post-to-pdf-post 1.mdl ark:- ark:-\n";
......
......@@ -30,6 +30,7 @@ int main(int argc, char *argv[]) {
const char *usage =
"Convert posteriors to phone-level posteriors\n"
"See also: post-to-pdf-post, post-to-weights, get-post-on-ali\n"
"\n"
"Usage: post-to-phone-post [options] <model> <post-rspecifier> <phone-post-wspecifier>\n"
" e.g.: post-to-phone-post --binary=false 1.mdl \"ark:ali-to-post 1.ali|\" ark,t:-\n";
......
......@@ -31,7 +31,9 @@ int main(int argc, char *argv[]) {
const char *usage =
"Turn posteriors into per-frame weights (typically most useful after\n"
"weight-silence-post, to get silence weights)\n"
"Usage: post-to-weights post-rspecifier weights-wspecifier\n";
"See also: weight-silence-post, post-to-pdf-post, post-to-phone-post\n"
"get-post-on-ali\n"
"Usage: post-to-weights <post-rspecifier> <weights-wspecifier>\n";
ParseOptions po(usage);
po.Read(argc, argv);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment