rescore-decipher [ -bytelog ] [ -nodecipherlm ] [ -multiwords ] \ [ -multi-char C ] [ -pretty mapfile ] \ [ -ngram-tool program ][ -filter command ] \ [ -norescore ] [ -lm-only ] [ -count-oovs ] [ -limit-vocab ] \ [ -vocab-aliases mapfile ] [ -fast ] \ nbest-file-list score-dir -lm ... lm-options ... rescore-acoustic old-nbest-dir|old-file-list old-ac-weight \ new-score-dir1 new-ac-weight1 ... new-nbest-dir [ max-nbest ] rescore-reweight [ -multiwords ] [ -multi-char C ] score-dir|file-list \ [ lmw [ wtw [ score-dir1 score-weight1 ... ] [ max-nbest ]]] rescore-minimize-wer score-dir [ lmw [ wtw [ max-nbest ]]] nbest2-to-nbest1 [ nbest-file ] nbest-rover [ sentid-list | - ] control-file \ [ posterior-file [ nbest-lattice-options ] ] combine-rover-controls [ lambda=weights ] [ postscale=S ] \ [ keeppaths=1 ] rover-control [ ... ] rover-control-weights [ weights="w1 ... wn" ] control-file rover-control-tying control-file nbest-optimize-args-from-rover-control [ print_weights=1 ] [ print_dirs=1 ] control-file compute-best-rover-mix [ lambda=weights ] [ addone=c ] [ precision=p ] \ [ tying="b1 ... bn" ] [ write_weights=file ] reference-posteriors-output search-rover-combo [ -scorer script ] [ -datadir dir ] \ [ -weights weights ] [ -sentids list ] \ [ -refs refs ] [ -smooth-weight S ] \ [ -J n ] list-of-control-files nbest-posteriors [ weight=W ] [ lmw=lmw ] [ wtw=wtw ] [ postscale=S ] \ [ max_nbest=M ] nbest-file merge-nbest [ multiwords=1 ] [ multichar=C ] [ nopauses=1 ] \ [ max_nbest=M ] nbest-file ... nbest-vocab [ nbest-list ... ] nbest-words [ nbest-list ... ] nbest-oov-counts vocab=vocabfile [ vocab_aliases=aliasfile ] nbest-list nbest-error score-dir|file-list refs [ nbest-lattice-option ... ] sentid-to-sclite hyps sentid-to-ctm hyps fix-ctm ctmfile compute-sclite -r refs -h hyps [ -h hyps ... ] [ -S subset ... ] \ [ -multiwords|-M ] [ -noperiods ] [ -R ] [ -g glmfile ] [ -H ] \ [ -v ] [ sclite-options ...] compute-sclite-nbest file-list output-dir -r refs [ -filter script ] [ sclite-options ...] compare-sclite -r refs -h1 hyps1 -h2 hyps2 [ -S subset ] \ [ compute-sclite-options ... ]
rescore-decipher applies a language model implemented by ngram(1) to the N-best lists listed in nbest-file-list. The N-best files may be in compressed format. The rescored N-best lists are stored in directory score-dir. All following arguments are passed to ngram(1) and are used to control the language model. The following options are handled by rescore-decipher itself:
rescore-acoustic replaces the acoustic scores in a set of N-best lists by a weighted combination of new scores. The old N-best lists are given by either a directory old-score-dir or a filelist old-file-list; old-ac-weight is the weight given to the old scores. Directories containing the new scores are listed alternating with the corresponding weights; each score directory must contain one file per waveform segment, each having the same file basenames as the original N-best lists. The new scores should appear in a single column per file, one per line. The N-best lists containing the new combined acoustic scores are written to new-nbest-dir. The optional max-nbest argument can be used to limit the length of the N-best lists output. Also, When a new score file is encountered containing fewer than max-nbest lines, the missing scores are set to the lowest score encountered so far.
rescore-reweight combines the scores in N-best lists with a set of weights and outputs the 1-best hypotheses. The N-best files are found in directory score-dir or listed in file-list. Optional arguments set the language model weight lmw (default 8), the word transition weight wtw (default 0), and the maximum number max-nbest of hypotheses to consider (default all). Optionally, any number of additional score directories and associated weights score-dir1 score-weight1 score-dir2 score-weight2 ... can be specified, following the wtw parameter. These additional scores are combined with those contained in the N-best lists themselves as in rescore-acoustic (using unit weight for the original acoustic scores). The -multiwords and -multi-char options have the same function as for rescore-decipher. The output format for 1-best hypotheses is
sentid w1 w2 ...where sentid is the sentence ID derived from the N-best filename, followed by the words.
rescore-minimize-wer is similar to rescore-reweight but picks hypotheses using the word error minimization algorithm of nbest-lattice(1).
nbest2-to-nbest1 converts an N-best list in ``NBestList2.0'' format to ``NBestlist1.0'', for the benefit of programs that have not yet been updated to deal with the new format.
nbest-rover combines hypotheses from multiple N-best lists at the word level, by performing the same kind of word error minimization as nbest-lattice(1), in a generalization of the ROVER algorithm. sentid-list is a file listing sentence IDs. These must match the filenames in a set of N-best directories, which are specified in a control-file. The format for the latter is
dir1 lmw1 wtw1 w1 [n1 [s1]] dir2 lmw2 wtw2 w2 [n2 [s2]] ...Each line specifies an N-best directory, the language model and word transition weights to be used in score combination, and a weight to be applied to the posterior probabilities. A weight of "=" denotes a value equal to the previous system and is used to encode weight tying. An optional next-to-last parameter for each N-best list allows the lists to be truncated to the top n1, n2, etc., hypotheses. The final optional parameter sets the posterior distribution scaling factor, which defaults to the language model weight. Optionally, control-file can also contain lines of the form dir w + These indicate that additional score files can be found in directory dir and that the scores found therein should be added to the following N-best list set with weight w. Several lines of this form may occur preceding a regular N-best directory specification; the corresponding additive combination of multiple scores is performed.
Additional arguments are treated as options, in particular
Any other additional arguments are passed to the underlying
nbest-rover can process N-best lists in any of the formats described in nbest-format(5), as long as all N-best lists for a given utterance are in the same format. When Decipher formats are used only their acoustic scores are used.
combine-rover-controls takes one or more nbest-rover control files as arguments and outputs a new control file that specifies the combination of the input files. Directory names in the input files are adjusted to reflect the relative location of the input files, unless the keeppaths=1 option is used. Each input system is given equal weight, unless the optional lambda=weights argument is used to specify a space-separated list of system weights (spaces in the weight vector need to be quoted on the command line). The postscale=S argument overrides the posterior scaling factor in all input systems with the value S.
rover-control-weights either retrieves or changes the weights in an nbest-rover control file. If the weights= argument is specified, the weights in the input control file are altered to the values in the argument and a new control file is written to stdout. Otherwise, the list of current weights is output as a single line.
estimates the best weighting of a set of nbest system outputs for
The required input file
is produced by running
to record the posteriors of the reference word strings on a tuning set:
nbest-rover - control-file /dev/null \
-refs references \
Initial weights are specified with lambda=weights.
An additive constant for Laplace smoothing can be specified with addone=c.
The tying= argument allows the system weights to be tied. It should specify a string of positive integers (the bin numbers) with one value for each system weight. For example tying='1 1 2 3 3' means that the first two and the last two of five weights are to be tied (put in the same bin).
The estimated weight vector can optionally be written to a file using write_weights=file. The weights can then be inserted into the original control-file, e.g., using rover-control-weights.
rover-control-tying extracts the value for the compute-best-rover-mix tying= argument from an existing nbest-rover control file.
nbest-optimize-args-from-rover-control extracts information from existing nbest-rover control files that can be passed as arguments to nbest-optimize(1) for initializing the search. Options allow printing only the score weights, or only the list of additional scores directories.
search-rover-combo searches for a good subset of systems to combine via nbest-rover. It performs a greedy search starting with the system that gives the lowest individual error, and then adds one system at a time until no further error reduction is possible. The required argument list-of-control-files is a file listing the nbest-rover control files representating the individual systems to be combined. An nbest-rover control file is written to stdout representing the combined system. Options are:
nbest-posteriors rescales the scores in an N-best list to reflect (weighted) posterior probabilities. The output is the same N-best list with acoustic scores set to the log (base 10) of the posterior hyp probabilities and LM scores set to zero. postscale=S attenuates the posterior distribution by dividing combined log scores by S (the default is S=lmw). If weight=W is specified the posteriors are multiplied by W. max_nbest=M limits the number of hypotheses used to the top M. This script is used mostly as a helper in nbest-rover.
merge-nbest merges hypotheses from one or more N-best lists into a single list, collapsing hypotheses that occur in more than one input list. If all input lists use the same nbest-format(5) then the output will also be in that format and contain the information from the first list in which a hypothesis was encountered. Otherwise, the output will be in SRI Decipher(TM) NBestList1.0 format and contain acoustic scores and word strings only. The max_nbest=M option limits input to the first M hypotheses from each input list. multiwords=1 merges hypotheses that are identical after resolving multiwords, with multichar=C defining a non-default multiword separator character. nopauses=1 merges hypotheses that are identical after removal of pause words.
nbest-vocab outputs the vocabulary used in a set of N-best lists. (The N-best files cannot be compressed, but may be concatenated and supplied via stdin.)
nbest-words strips any score and alignment information from N-best lists and outputs only the words, one hypothesis per line.
nbest-oov-counts computes the number of out-of-vocabulary words for each hypothesis in an N-best list, relative to a vocabulary listed in vocabfile. Optionally a vocabulary mapping from aliasfile is applied (as with the ngram(1) -vocab-aliases option). The OOV counts are output on stdout and can be used as a score file for N-best rescoring.
nbest-error computes the overall oracle word error rate of a set of N-best lists in directory score-dir or listed in file-list. The reference answers are given in refs in the format output by rescore-reweight (see above). Additional arguments are passed to the underlying invocation of nbest-lattice(1), and can be used to limit the depth of the N-best list, compute lattice error rather than N-best error, etc.
sentid-to-sclite converts 1-best hypotheses and references in the format used here to the ``trn'' format expected by the NIST sclite(1) scoring software.
sentid-to-ctm converts 1-best hypotheses and references in the format used here to NIST ctm(5) format. The script relies on an encoding of conversation IDs, channel, and utterance time marks in the sentence IDs and may need adjustment to local conventions.
fix-ctm converts output produced by the -output-ctm option of nbest-lattice(1) and lattice-tool(1) to a format suitable for scoring with NIST sclite(1). It, too, relies on information encoded in the sentids IDs and may need adjustments.
compute-sclite is a wrapper around the NIST sclite(1) scoring tool. refs and hyps are the reference and hypothesized transcripts, respectively. The refs file can be either in "sentid" format or in stm(5) format. In the latter case, hyps will be converted to ctm(5) format using the sentid-to-ctm helper script. The hyps file can be either in "sentid" format or in ctm(5) format. More than one -h option can be given to combine the contents of multiple hypotheses files. Optionally, -S specifies a sorted list of sentence IDs subset to score. Multiple -S options may be given, to form the intersection of several subsets. -multiwords or -M splits ``multiwords'' joined by underscores into their component words prior to scoring. -noperiods deletes periods from the hypotheses prior to scoring (typically used to bridge different conventions for spelled letters). -R preserves reject words in the hypotheses for scoring (as appropriate if references also contain rejects). -g glmfile enables filtering of references and hypotheses by the NIST csrfilt.sh script, controlled by the filter file glmfile (this is only possible with an stm reference file). In that case, the -H option causes hesitations (as defined by the filter) to be deleted from the output for scoring purposes. -v displays the complete command used to invoke sclite. Any additional options are passed to sclite, e.g., to control its output actions or alignment mode.
compute-sclite-nbest runs compute-sclite on a set of N-best lists specified by file-list and deposits the error counts in a directory output-dir. These error counts may be used with the nbest-optimize(1) -errors option to specify the hypothesis-level errors explicitly. The references must be given in a file refs one per line, with the first word in each line matching the file basename of the corresponding N-best list. Additional options to be passed to compute-sclite (and ultimately to sclite(1)) may be specified at the end of the command line. The -filter option specifies a filtering script that edits the hypotheses before error computation.
compare-sclite scores two sets of hypotheses hyps1 and hyps2 for the same test set and computes in how many cases the first or second set had lower word error. The remaining options are as for compute-sclite. The script ignores hypotheses for sentence that do not appear in both hypothesis files, to ensure comparable scoring results.
rescore-decipher -pretty may not work correctly with the -limit-vocab option if the word mapping adds to the vocabulary subset used in the N-best lists.