📄 lattice-tool.html
字号:
Output the list of all words found in the lattice(s) to <I>file</I>.<I></I><DT><B> -reduce </B><DD>Reduce lattice size by a single forward node merging pass.<DT><B>-reduce-iterate</B><I> I</I><B></B><DD>Reduce lattice size by up to<I> I </I>forward-backward node merging passes.<DT><B>-overlap-ratio</B><I> R</I><B></B><DD>Perform approximate lattice reduction by merging nodes that share more than a fraction<I> R </I>of their incoming or outgoing nodes.The default is 0, i.e., only exact lattice reduction is performed.<DT><B>-overlap-base</B><I> B</I><B></B><DD>If <I> B </I>is 0 (the default), then the overlap ratio<I> R </I>is taken relative to the smaller set of transitions being compared.If the value is 1, the ratio is relative to the larger of the two sets.<DT><B> -reduce-before-pruning </B><DD>Perform lattice reduction before posterior-based pruning.The default order is to first prune, then reduce.<DT><B>-pre-reduce-iterate</B><I> I</I><B></B><DD>Perform iterative reduction prior to lattice expansion, but after pause elimination.<DT><B>-post-reduce-iterate</B><I> I</I><B></B><DD>Perform iterative reduction after lattice expansion and pause node recovery.Note: this is not recommended as it changes the weights assigned fromthe specified language model.<DT><B> -no-nulls </B><DD>Eliminate NULL nodes from lattices.<DT><B> -no-pause </B><DD>Eliminate pause nodes from lattices(and do not recover them after lattice expansion).<DT><B> -compact-pause </B><DD>Use compact encoding of pause nodes that saves nodes but allows optional pauses where they might not have been included in the originallattice.<DT><B> -loop-pause </B><DD>Add self-loops on pause nodes.<DT><B> -insert-pause </B><DD>Insert optional pauses after every word in the lattice.The structure of inserted pauses is affected by<B> -compact-pause </B>and<B>-loop-pause</B>.<B></B><DT><B> -collapse-same-words </B><DD>Perform an operation on the final lattices that collapses all nodes with the same words, except null nodes, pause nodes, or nodes with noise words.This can reduce the lattice size dramatically, but also introduces new paths.<DT><B> -connectivity </B><DD>Check the connectedness of lattices.<DT><B> -compute-node-entropy </B><DD>Compute the node entropy of lattices.<DT><B> -compute-posteriors </B><DD>Compute node posterior probabilities(which are included in HTK lattice output).<DT><B> -density </B><DD>Compute and output lattice densities.<DT><B>-ref-list</B><I> file</I><B></B><DD>Read reference word strings from <I>file</I>.<I></I>Each line starts with a sentence ID (the basename of the lattice file name),followed by the words.This and the next option triggers computation of lattice word errors(minimum word error counts of any path through a lattice).<DT><B>-ref-file</B><I> file</I><B></B><DD>Read reference word strings from<I>file</I>.<I></I>Lines must contain reference words only, and must be matched to inputlattices in the order processed.<DT><B>-write-refs</B><I> file</I><B></B><DD>Write the references back to <I> file </I>(for validation).<DT><B>-add-refs</B><I> P</I><B></B><DD>Add the reference words as an additional path to the lattice,with probability <I>P</I>.<I></I>Unless <B> -no-pause </B>is specified, optional pause nodes between words are also added.Note that this operation is performed before lattice reduction and expansion, so the new path can be merged with existing ones, and theprobabilities for the new path can be reassigned from an LM later.<DT><B>-noise-vocab</B><I> file</I><B></B><DD>Read a list of ``noise'' words from<I>file</I>.<I></I>These words are ignored when computing lattice word errors,when decoding the best word sequence using<B> -viterbi-decode </B>or<B>-posterior-decode</B>,<B></B>or when collapsing nodes with<B>-collapse-same-words</B>.<B></B><DT><B> -keep-pause </B><DD>Causes the pause word ``-pau-'' to be treated like a regular word.It prevents pause from being implicitly added to the list of noisewords.<DT><B>-ignore-vocab</B><I> file</I><B></B><DD>Read a list of words that are to be ignored inlattice operations, similar to pause tokens.Unlike noise words (see above) they are also skipped during LM evaluation.With this option and<B>-keep-pause</B>,<B></B>pause words are not ignored by default.<DT><B>-split-multiwords</B><I></I><B></B><DD>Split lattice nodes with multiwords into a sequence of non-multiwordnodes.This option is necessary to compute lattice error of multiword latticesagainst non-multiword references, but may be useful in its own right.<DT><B>-split-multiwords-after-lm</B><I></I><B></B><DD>Perform multiword splitting after lattice expansion using the specified LM.This should be used if the LM uses multiwords, but the final latticesare not supposed to contain multiwords.<DT><B>-multiword-dictionary</B><I> file</I><B></B><DD>Read a dictionary from <I> file </I>containing multiword pronunciations and word boundary markers (a ``|'' phonelabel).Specifying such a dictionary allows the multiword splitting optionsto infer accurate time marks and pronunciation information for themultiword components.<DT><B>-multi-char</B><I> C</I><B></B><DD>Designate <I> C </I>as the character used for separating multiword components.The default is an underscore ``_''.<DT><B>-operation</B><I> O</I><B></B><DD>Perform a lattice algebra operation<I> O </I>on the lattice or lattices processed, withthe second operand specified by <B>-in-lattice2</B>.<B></B>Operations currently supported are<B> concatenate </B>and<B>or</B>,<B></B>for serial and parallel lattice combination, respectively,and are applied after all other lattices manipulations.<DT><B> -viterbi-decode </B><DD>Print out the word sequence corresponding to the highest probability path.<DT><B> -posterior-decode </B><DD>Print out the word sequence with lowest expected word error.<DT><B> -output-ctm </B><DD>Output word sequences in NIST CTM (conversation time mark) format.Note that word start times will be relative to the lattice start time,the first column will contain the lattice name, and the channel fieldis always 1.The word confidence field contains posterior probabilities if <B>-posterior-decode</B><B></B>is in effect.This option also implies<B>-acoustic-mesh</B>.<B></B><DT><B>-hidden-vocab</B> file<B></B><DD>Read a subvocabulary from<I> file </I>and constrain word meshes to only align those words that are either allin or outside the subvocabulary.This may be used to keep ``hidden event'' tags from aligning withregular words.<DT><B> -dictionary-align </B><DD>Use the dictionary pronunciations specified with<B> -dictionary </B>to induce a word distance metric used for word mesh alignment.See the <A HREF="nbest-lattice.html">nbest-lattice(1)</A><B> -dictionary </B>option.<DT><B>-nbest-decode</B><I> N</I><B></B><DD>Generate the up to<I> N </I>highest scoring paths through a lattice and write them out in <A HREF="nbest-format.html">nbest-format(5)</A>,along with optional additional score files to store knowledge sources encodedin the lattice.Further options are needed to specify the location of N-best lists and score files, described below under "N-BEST DECODING".Duplicated Hypotheses that differ only in pause and words specified with<B> -ignore-vocab </B>are removed from the N-best output.If the<B> -multiwords </B>option is specified, duplicates due to multiwords are also eliminated.<DT><B>-nbest-duplicates</B><I> K</I><B></B><DD>Allow up to<I> K </I>duplicate word hypotheses to be output in N-best decoding.<DT><B>-nbest-max-stack</B><I> M</I><B></B><DD>Limits the depth of the hypothesis stack used in N-best decoding to<I> M </I>entries, which may be useful for limiting memory use and runtime.<DT><B> -nbest-viterbi </B><DD>Use a Viterbi algorithm to generate N-best, rather than A-star.This uses less memory but may take more time.<DT><B>-ppl</B><I> file</I><B></B><DD>Read sentences from<I> file </I>and compute the maximum probability (of any path) assigned to them by thelattice being processed.Effectively, the lattice is treated as a (deficient) language model.The output detail is controlled by the <B> -debug </B>option, similar to<B> ngram -ppl </B>output.(In particular, <B> -debug 2 </B>enables tracing of lattice nodes corresponding to sentence prefixes.)Pause words in <I> file </I>are treated as regular words and have to match pause nodes in the lattice, unless <B> -nopause </B>specified, in which case pauses in both lattice and input sentencesare ignored.</DD></DL><P>The following options control transition weight assignment:<DL><DT><B>-order</B><I> n</I><B></B><DD>Set the maximal N-gram order to be used for transition weight assignment(the default is 3).<DT><B>-lm</B><I> file</I><B></B><DD>Read N-gram language model from <I>file</I>.<I></I>This option also triggers weight reassignment and lattice expansion.<DT><B> -multiwords </B><DD>Resolve multiwords in the lattice without splitting nodes.This is useful in rescoring lattices containing multiwords with aLM does not use multiwords.<DT><B>-classes</B><I> file</I><B></B><DD>Interpret the LM as an N-gram over word classes.The expansions of the classes are given in<I>file</I><I></I>in <A HREF="classes-format.html">classes-format(5)</A>.Tokens in the LM that are not defined as classes in<I> file </I>are assumed to be plain words, so that the LM can contain mixed N-grams overboth words and word classes.<DT><B>-simple-classes</B><B></B><DD>Assume a "simple" class model: each word is member of at most one word class,and class expansions are exactly one word long.<DT><B>-mix-lm</B><I> file</I><B></B><DD>Read a second N-gram model for interpolation purposes.The second and any additional interpolated models can also be class N-grams(using the same<B> -classes </B>definitions).<DT><B> -factored </B><DD>Interpret the files specified by <B>-lm</B>,<B></B><B>-mix-lm</B>,<B></B>etc. as factored N-gram model specifications.See <A HREF="ngram.html">ngram(1)</A>for more details.<DT><B>-lambda</B><I> weight</I><B></B><DD>Set the weight of the main model when interpolating with<B>-mix-lm</B>.<B></B>Default value is 0.5.<DT><B>-mix-lm2</B><I> file</I><B></B><DD><DT><B>-mix-lm3</B><I> file</I><B></B><DD><DT><B>-mix-lm4</B><I> file</I><B></B><DD><DT><B>-mix-lm5</B><I> file</I><B></B><DD><DT><B>-mix-lm6</B><I> file</I><B></B><DD><DT><B>-mix-lm7</B><I> file</I><B></B><DD><DT><B>-mix-lm8</B><I> file</I><B></B><DD><DT><B>-mix-lm9</B><I> file</I><B></B><DD>Up to 9 more N-gram models can be specified for interpolation.<DT><B>-mix-lambda2</B><I> weight</I><B></B><DD><DT><B>-mix-lambda3</B><I> weight</I><B></B>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -