<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>PocketSphinx: src/libpocketsphinx/ps_lattice_internal.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">PocketSphinx <span id="projectnumber">0.6</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('ps__lattice__internal_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <h1>src/libpocketsphinx/ps_lattice_internal.h</h1> </div> </div> <div class="contents"> <a href="ps__lattice__internal_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */</span> <a name="l00002"></a>00002 <span class="comment">/* ====================================================================</span> <a name="l00003"></a>00003 <span class="comment"> * Copyright (c) 2008 Carnegie Mellon University. All rights</span> <a name="l00004"></a>00004 <span class="comment"> * reserved.</span> <a name="l00005"></a>00005 <span class="comment"> *</span> <a name="l00006"></a>00006 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span> <a name="l00007"></a>00007 <span class="comment"> * modification, are permitted provided that the following conditions</span> <a name="l00008"></a>00008 <span class="comment"> * are met:</span> <a name="l00009"></a>00009 <span class="comment"> *</span> <a name="l00010"></a>00010 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span> <a name="l00011"></a>00011 <span class="comment"> * notice, this list of conditions and the following disclaimer. </span> <a name="l00012"></a>00012 <span class="comment"> *</span> <a name="l00013"></a>00013 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span> <a name="l00014"></a>00014 <span class="comment"> * notice, this list of conditions and the following disclaimer in</span> <a name="l00015"></a>00015 <span class="comment"> * the documentation and/or other materials provided with the</span> <a name="l00016"></a>00016 <span class="comment"> * distribution.</span> <a name="l00017"></a>00017 <span class="comment"> *</span> <a name="l00018"></a>00018 <span class="comment"> * This work was supported in part by funding from the Defense Advanced </span> <a name="l00019"></a>00019 <span class="comment"> * Research Projects Agency and the National Science Foundation of the </span> <a name="l00020"></a>00020 <span class="comment"> * United States of America, and the CMU Sphinx Speech Consortium.</span> <a name="l00021"></a>00021 <span class="comment"> *</span> <a name="l00022"></a>00022 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND </span> <a name="l00023"></a>00023 <span class="comment"> * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, </span> <a name="l00024"></a>00024 <span class="comment"> * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR</span> <a name="l00025"></a>00025 <span class="comment"> * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY</span> <a name="l00026"></a>00026 <span class="comment"> * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span> <a name="l00027"></a>00027 <span class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT </span> <a name="l00028"></a>00028 <span class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, </span> <a name="l00029"></a>00029 <span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY </span> <a name="l00030"></a>00030 <span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT </span> <a name="l00031"></a>00031 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE </span> <a name="l00032"></a>00032 <span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span> <a name="l00033"></a>00033 <span class="comment"> *</span> <a name="l00034"></a>00034 <span class="comment"> * ====================================================================</span> <a name="l00035"></a>00035 <span class="comment"> *</span> <a name="l00036"></a>00036 <span class="comment"> */</span> <a name="l00037"></a>00037 <a name="l00042"></a>00042 <span class="preprocessor">#ifndef __PS_LATTICE_INTERNAL_H__</span> <a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define __PS_LATTICE_INTERNAL_H__</span> <a name="l00044"></a>00044 <span class="preprocessor"></span> <a name="l00053"></a><a class="code" href="structlatlink__list__s.html">00053</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structlatlink__list__s.html" title="Linked list of DAG link pointers.">latlink_list_s</a> { <a name="l00054"></a>00054 <a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_t</a> *link; <a name="l00055"></a>00055 <span class="keyword">struct </span><a class="code" href="structlatlink__list__s.html" title="Linked list of DAG link pointers.">latlink_list_s</a> *next; <a name="l00056"></a>00056 } <a class="code" href="ps__lattice__internal_8h.html#a32dd9511afc2f024dc63c9c060261e94" title="Linked list of DAG link pointers.">latlink_list_t</a>; <a name="l00057"></a>00057 <a name="l00061"></a><a class="code" href="structps__lattice__s.html">00061</a> <span class="keyword">struct </span><a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_s</a> { <a name="l00062"></a><a class="code" href="structps__lattice__s.html#a6d66b392dec016b3304da2f53be17dd1">00062</a> <span class="keywordtype">int</span> <a class="code" href="structps__lattice__s.html#a6d66b392dec016b3304da2f53be17dd1" title="Reference count.">refcount</a>; <a name="l00064"></a><a class="code" href="structps__lattice__s.html#a28f4ff5039e0961d57331d2605801010">00064</a> logmath_t *<a class="code" href="structps__lattice__s.html#a28f4ff5039e0961d57331d2605801010" title="Log-math object.">lmath</a>; <a name="l00065"></a><a class="code" href="structps__lattice__s.html#a9ebaeb7be7a83980569f0c544eb6babb">00065</a> <a class="code" href="structps__search__s.html" title="Base structure for search module.">ps_search_t</a> *<a class="code" href="structps__lattice__s.html#a9ebaeb7be7a83980569f0c544eb6babb" title="Search (if generated by search).">search</a>; <a name="l00066"></a><a class="code" href="structps__lattice__s.html#a71865c59fae65743ef3c6b5aceb17da6">00066</a> <a class="code" href="structdict__t.html" title="a structure for a dictionary.">dict_t</a> *<a class="code" href="structps__lattice__s.html#a71865c59fae65743ef3c6b5aceb17da6" title="Dictionary for this DAG.">dict</a>; <a name="l00067"></a><a class="code" href="structps__lattice__s.html#acd3f3ab2649f649ba33bf2a422cf12b8">00067</a> int32 <a class="code" href="structps__lattice__s.html#acd3f3ab2649f649ba33bf2a422cf12b8" title="Silence word ID.">silence</a>; <a name="l00068"></a><a class="code" href="structps__lattice__s.html#a5159a2ff1e03a7c9782854bc67e56530">00068</a> int32 <a class="code" href="structps__lattice__s.html#a5159a2ff1e03a7c9782854bc67e56530" title="Frame rate.">frate</a>; <a name="l00070"></a><a class="code" href="structps__lattice__s.html#a838bd9223e35d012419e6225b54e393d">00070</a> <a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_t</a> *<a class="code" href="structps__lattice__s.html#a838bd9223e35d012419e6225b54e393d" title="List of all nodes.">nodes</a>; <a name="l00071"></a><a class="code" href="structps__lattice__s.html#a5d936695a3813e117d20b585d48db8fe">00071</a> <a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_t</a> *<a class="code" href="structps__lattice__s.html#a5d936695a3813e117d20b585d48db8fe" title="Starting node.">start</a>; <a name="l00072"></a><a class="code" href="structps__lattice__s.html#a00f30e2689853d6bcb31c8005a69dc7b">00072</a> <a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_t</a> *<a class="code" href="structps__lattice__s.html#a00f30e2689853d6bcb31c8005a69dc7b" title="Ending node.">end</a>; <a name="l00074"></a><a class="code" href="structps__lattice__s.html#aceffa52806f2467e4c83356fef3edc87">00074</a> int16 <a class="code" href="structps__lattice__s.html#aceffa52806f2467e4c83356fef3edc87" title="Number of frames for this utterance.">n_frames</a>; <a name="l00075"></a><a class="code" href="structps__lattice__s.html#ab3690a8d16e3fa8a3b0dd3aa8277b653">00075</a> int16 <a class="code" href="structps__lattice__s.html#ab3690a8d16e3fa8a3b0dd3aa8277b653" title="Number of nodes in this lattice.">n_nodes</a>; <a name="l00076"></a><a class="code" href="structps__lattice__s.html#aba113d4134c72d7405423c77bcc1247e">00076</a> int32 <a class="code" href="structps__lattice__s.html#aba113d4134c72d7405423c77bcc1247e" title="Acoustic score of implicit link exiting final node.">final_node_ascr</a>; <a name="l00077"></a><a class="code" href="structps__lattice__s.html#a68c3259613a16628e1dd2e8147705d8e">00077</a> int32 <a class="code" href="structps__lattice__s.html#a68c3259613a16628e1dd2e8147705d8e" title="Normalizer for posterior probabilities.">norm</a>; <a name="l00078"></a><a class="code" href="structps__lattice__s.html#ac3844c69f8393b607047bd9b302b979a">00078</a> <span class="keywordtype">char</span> *<a class="code" href="structps__lattice__s.html#ac3844c69f8393b607047bd9b302b979a" title="Current hypothesis string.">hyp_str</a>; <a name="l00080"></a><a class="code" href="structps__lattice__s.html#a14e4e87550647d5119cd1cc48ff4f3f1">00080</a> listelem_alloc_t *<a class="code" href="structps__lattice__s.html#a14e4e87550647d5119cd1cc48ff4f3f1" title="Node allocator for this DAG.">latnode_alloc</a>; <a name="l00081"></a><a class="code" href="structps__lattice__s.html#afa8ca535dc8bf2cc656f6ad477e13b9f">00081</a> listelem_alloc_t *<a class="code" href="structps__lattice__s.html#afa8ca535dc8bf2cc656f6ad477e13b9f" title="Link allocator for this DAG.">latlink_alloc</a>; <a name="l00082"></a><a class="code" href="structps__lattice__s.html#a8e9cfaf92f9a3588d018578854c61e88">00082</a> listelem_alloc_t *<a class="code" href="structps__lattice__s.html#a8e9cfaf92f9a3588d018578854c61e88" title="List element allocator for this DAG.">latlink_list_alloc</a>; <a name="l00084"></a>00084 <span class="comment">/* This will probably be replaced with a heap. */</span> <a name="l00085"></a><a class="code" href="structps__lattice__s.html#a26c029189074db2f668d5a9d67eb7af5">00085</a> <a class="code" href="structlatlink__list__s.html" title="Linked list of DAG link pointers.">latlink_list_t</a> *<a class="code" href="structps__lattice__s.html#a26c029189074db2f668d5a9d67eb7af5" title="Queue of links for traversal.">q_head</a>; <a name="l00086"></a><a class="code" href="structps__lattice__s.html#a5a9faf5e4aabd84a868d1bff97dd9814">00086</a> <a class="code" href="structlatlink__list__s.html" title="Linked list of DAG link pointers.">latlink_list_t</a> *<a class="code" href="structps__lattice__s.html#a5a9faf5e4aabd84a868d1bff97dd9814" title="Queue of links for traversal.">q_tail</a>; <a name="l00087"></a>00087 }; <a name="l00088"></a>00088 <a name="l00096"></a><a class="code" href="structps__latlink__s.html">00096</a> <span class="keyword">struct </span><a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_s</a> { <a name="l00097"></a><a class="code" href="structps__latlink__s.html#ab0912c26d1472b4c5c07042c19ffb979">00097</a> <span class="keyword">struct </span><a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_s</a> *<a class="code" href="structps__latlink__s.html#ab0912c26d1472b4c5c07042c19ffb979" title="From node.">from</a>; <a name="l00098"></a><a class="code" href="structps__latlink__s.html#a782a15b1aeabf68983ca521e51f2c1e1">00098</a> <span class="keyword">struct </span><a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_s</a> *<a class="code" href="structps__latlink__s.html#a782a15b1aeabf68983ca521e51f2c1e1" title="To node.">to</a>; <a name="l00099"></a>00099 <span class="keyword">struct </span><a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_s</a> *best_prev; <a name="l00100"></a><a class="code" href="structps__latlink__s.html#ae8a94ce1afb49292b044a0d4ba42b46d">00100</a> int32 <a class="code" href="structps__latlink__s.html#ae8a94ce1afb49292b044a0d4ba42b46d" title="Score for from-&gt;wid (from-&gt;sf to this-&gt;ef)">ascr</a>; <a name="l00101"></a><a class="code" href="structps__latlink__s.html#a704fcfbdb57b1461325544c782289599">00101</a> int32 <a class="code" href="structps__latlink__s.html#a704fcfbdb57b1461325544c782289599" title="Best path score from root of DAG.">path_scr</a>; <a name="l00102"></a><a class="code" href="structps__latlink__s.html#a73af187524eb6ec82ad9ae857d11edc6">00102</a> int32 <a class="code" href="structps__latlink__s.html#a73af187524eb6ec82ad9ae857d11edc6" title="Ending frame of this word.">ef</a>; <a name="l00103"></a><a class="code" href="structps__latlink__s.html#ad2f031d271f1d875223aae33116d3f40">00103</a> int32 <a class="code" href="structps__latlink__s.html#ad2f031d271f1d875223aae33116d3f40" title="Forward probability of this link P(w,o_1^{ef})">alpha</a>; <a name="l00104"></a><a class="code" href="structps__latlink__s.html#a4c27cd5d4f514832d3d46993e2ee87df">00104</a> int32 <a class="code" href="structps__latlink__s.html#a4c27cd5d4f514832d3d46993e2ee87df" title="Backward probability of this link P(w|o_{ef+1}^T)">beta</a>; <a name="l00105"></a>00105 }; <a name="l00106"></a>00106 <a name="l00113"></a><a class="code" href="structps__latnode__s.html">00113</a> <span class="keyword">struct </span><a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_s</a> { <a name="l00114"></a><a class="code" href="structps__latnode__s.html#a78243b37753f7a209c15d6adf98ee3f7">00114</a> int32 <a class="code" href="structps__latnode__s.html#a78243b37753f7a209c15d6adf98ee3f7" title="Unique id for this node.">id</a>; <a name="l00115"></a><a class="code" href="structps__latnode__s.html#afd85dbd410d6e6d970c73088bc6fb97e">00115</a> int32 <a class="code" href="structps__latnode__s.html#afd85dbd410d6e6d970c73088bc6fb97e" title="Dictionary word id.">wid</a>; <a name="l00116"></a><a class="code" href="structps__latnode__s.html#ae3b3dc7d14347e6380859c74b9a02589">00116</a> int32 <a class="code" href="structps__latnode__s.html#ae3b3dc7d14347e6380859c74b9a02589" title="Dictionary base word id.">basewid</a>; <a name="l00117"></a>00117 <span class="comment">/* FIXME: These are (ab)used to store backpointer indices, therefore they MUST be 32 bits. */</span> <a name="l00118"></a><a class="code" href="structps__latnode__s.html#a584ee5a303355d851ac903718998df14">00118</a> int32 <a class="code" href="structps__latnode__s.html#a584ee5a303355d851ac903718998df14" title="First end frame.">fef</a>; <a name="l00119"></a><a class="code" href="structps__latnode__s.html#a5c7b9114d131151d6ce85228ea9f829d">00119</a> int32 <a class="code" href="structps__latnode__s.html#a5c7b9114d131151d6ce85228ea9f829d" title="Last end frame.">lef</a>; <a name="l00120"></a><a class="code" href="structps__latnode__s.html#a77d358dc8c6e0f112855e8ff0629b6c8">00120</a> int16 <a class="code" href="structps__latnode__s.html#a77d358dc8c6e0f112855e8ff0629b6c8" title="Start frame.">sf</a>; <a name="l00121"></a><a class="code" href="structps__latnode__s.html#af9c4c69f5f85bbc36818357a52432565">00121</a> int16 <a class="code" href="structps__latnode__s.html#af9c4c69f5f85bbc36818357a52432565" title="From.">reachable</a>; <a name="l00122"></a>00122 <span class="keyword">union </span>{ <a name="l00123"></a><a class="code" href="structps__latnode__s.html#ae66af31a8e7e1d1cae25a3f3938ffc34">00123</a> glist_t <a class="code" href="structps__latnode__s.html#ae66af31a8e7e1d1cae25a3f3938ffc34" title="List of history entries with different lmstate (tst only)">velist</a>; <a name="l00124"></a><a class="code" href="structps__latnode__s.html#a74ba4cfd8ebbb73772b8377d4517d9c0">00124</a> int32 <a class="code" href="structps__latnode__s.html#a74ba4cfd8ebbb73772b8377d4517d9c0" title="Number nodes with links to this node.">fanin</a>; <a name="l00125"></a><a class="code" href="structps__latnode__s.html#ac0e665aedad3044c79b35c4038627a77">00125</a> int32 <a class="code" href="structps__latnode__s.html#ac0e665aedad3044c79b35c4038627a77" title="Estimated best score from node.sf to end.">rem_score</a>; <a name="l00126"></a><a class="code" href="structps__latnode__s.html#a855680c8e26809995d6a341308858984">00126</a> int32 <a class="code" href="structps__latnode__s.html#a855680c8e26809995d6a341308858984" title="Best exit score (used for final nodes only)">best_exit</a>; <a name="l00127"></a>00127 } info; <a name="l00128"></a><a class="code" href="structps__latnode__s.html#a5232eefbc6e800b77e7a3c8ee3f4135d">00128</a> <a class="code" href="structlatlink__list__s.html" title="Linked list of DAG link pointers.">latlink_list_t</a> *<a class="code" href="structps__latnode__s.html#a5232eefbc6e800b77e7a3c8ee3f4135d" title="Links out of this node.">exits</a>; <a name="l00129"></a><a class="code" href="structps__latnode__s.html#a051a7eed31e29dd75151d1b34cc4eefa">00129</a> <a class="code" href="structlatlink__list__s.html" title="Linked list of DAG link pointers.">latlink_list_t</a> *<a class="code" href="structps__latnode__s.html#a051a7eed31e29dd75151d1b34cc4eefa" title="Links into this node.">entries</a>; <a name="l00131"></a><a class="code" href="structps__latnode__s.html#aa4c0a395c74acbacccde561f92fa89e4">00131</a> <span class="keyword">struct </span><a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_s</a> *<a class="code" href="structps__latnode__s.html#aa4c0a395c74acbacccde561f92fa89e4" title="Node with alternate pronunciation for this word.">alt</a>; <a name="l00132"></a><a class="code" href="structps__latnode__s.html#aca6f3d543a1712a1ca3bb8ec60f71c84">00132</a> <span class="keyword">struct </span><a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_s</a> *<a class="code" href="structps__latnode__s.html#aca6f3d543a1712a1ca3bb8ec60f71c84" title="Next node in DAG (no ordering implied)">next</a>; <a name="l00133"></a>00133 }; <a name="l00134"></a>00134 <a name="l00138"></a><a class="code" href="structdag__seg__s.html">00138</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdag__seg__s.html" title="Segmentation &quot;iterator&quot; for backpointer table results.">dag_seg_s</a> { <a name="l00139"></a><a class="code" href="structdag__seg__s.html#a72f90e137c1f83ab3df6ecd5e1b6dc71">00139</a> <a class="code" href="structps__seg__s.html" title="Base structure for hypothesis segmentation iterator.">ps_seg_t</a> <a class="code" href="structdag__seg__s.html#a72f90e137c1f83ab3df6ecd5e1b6dc71" title="Base structure.">base</a>; <a name="l00140"></a><a class="code" href="structdag__seg__s.html#a5fcc22d787e4db1bdc728ff8faead738">00140</a> <a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_t</a> **<a class="code" href="structdag__seg__s.html#a5fcc22d787e4db1bdc728ff8faead738" title="Array of lattice links.">links</a>; <a name="l00141"></a><a class="code" href="structdag__seg__s.html#a4517656eeaa40d33109d39a251a75dea">00141</a> int32 <a class="code" href="structdag__seg__s.html#a4517656eeaa40d33109d39a251a75dea" title="Normalizer for posterior probabilities.">norm</a>; <a name="l00142"></a><a class="code" href="structdag__seg__s.html#a2a858ea6ef051074be2bd1716a4939fb">00142</a> int16 <a class="code" href="structdag__seg__s.html#a2a858ea6ef051074be2bd1716a4939fb" title="Number of lattice links.">n_links</a>; <a name="l00143"></a><a class="code" href="structdag__seg__s.html#a0fed697e06d12e5a0405fdcb0d97faf1">00143</a> int16 <a class="code" href="structdag__seg__s.html#a0fed697e06d12e5a0405fdcb0d97faf1" title="Current position in bpidx.">cur</a>; <a name="l00144"></a>00144 } <a class="code" href="ps__lattice__internal_8h.html#a58a548300316e58e8c3b9e2bb90f980a" title="Segmentation &quot;iterator&quot; for backpointer table results.">dag_seg_t</a>; <a name="l00145"></a>00145 <a name="l00152"></a><a class="code" href="structps__latpath__s.html">00152</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_s</a> { <a name="l00153"></a><a class="code" href="structps__latpath__s.html#a9672f7a5002d994985039aece2a69250">00153</a> <a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_t</a> *<a class="code" href="structps__latpath__s.html#a9672f7a5002d994985039aece2a69250" title="Node ending this path.">node</a>; <a name="l00154"></a><a class="code" href="structps__latpath__s.html#a87acd26322fca11aa1432cdf9d1a2128">00154</a> <span class="keyword">struct </span><a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_s</a> *<a class="code" href="structps__latpath__s.html#a87acd26322fca11aa1432cdf9d1a2128" title="Previous element in this path.">parent</a>; <a name="l00155"></a><a class="code" href="structps__latpath__s.html#a614ad4a857fb07f76959d385abf50a6d">00155</a> <span class="keyword">struct </span><a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_s</a> *<a class="code" href="structps__latpath__s.html#a614ad4a857fb07f76959d385abf50a6d" title="Pointer to next path in list of paths.">next</a>; <a name="l00156"></a><a class="code" href="structps__latpath__s.html#a9249fb528f754db992df1d494a69b580">00156</a> int32 <a class="code" href="structps__latpath__s.html#a9249fb528f754db992df1d494a69b580" title="Exact score from start node up to node-&gt;sf.">score</a>; <a name="l00157"></a>00157 } <a class="code" href="ps__lattice__internal_8h.html#aba5a485290f665fb2e7e514a32ba3073" title="Partial path structure used in N-best (A*) search.">ps_latpath_t</a>; <a name="l00158"></a>00158 <a name="l00162"></a><a class="code" href="structps__astar__s.html">00162</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structps__astar__s.html" title="A* search structure.">ps_astar_s</a> { <a name="l00163"></a>00163 <a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag; <a name="l00164"></a>00164 ngram_model_t *lmset; <a name="l00165"></a>00165 float32 lwf; <a name="l00166"></a>00166 <a name="l00167"></a>00167 int16 sf; <a name="l00168"></a>00168 int16 ef; <a name="l00169"></a>00169 int32 w1; <a name="l00170"></a>00170 int32 w2; <a name="l00171"></a>00171 <a name="l00172"></a>00172 int32 n_hyp_tried; <a name="l00173"></a>00173 int32 n_hyp_insert; <a name="l00174"></a>00174 int32 n_hyp_reject; <a name="l00175"></a>00175 int32 insert_depth; <a name="l00176"></a>00176 int32 n_path; <a name="l00177"></a>00177 <a name="l00178"></a>00178 <a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_t</a> *path_list; <a name="l00179"></a>00179 <a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_t</a> *path_tail; <a name="l00180"></a>00180 <a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_t</a> *top; <a name="l00181"></a>00181 <a name="l00182"></a><a class="code" href="structps__astar__s.html#ace603617a74a81575519ae1bb94720c4">00182</a> glist_t <a class="code" href="structps__astar__s.html#ace603617a74a81575519ae1bb94720c4" title="List of hypothesis strings.">hyps</a>; <a name="l00183"></a><a class="code" href="structps__astar__s.html#a754bce124cd92b1b2b6aa6dbbcd73cee">00183</a> listelem_alloc_t *<a class="code" href="structps__astar__s.html#a754bce124cd92b1b2b6aa6dbbcd73cee" title="Path allocator for N-best search.">latpath_alloc</a>; <a name="l00184"></a>00184 } <a class="code" href="ps__lattice__internal_8h.html#a756a1b6f5dfe4e3f35052380f9acb8de" title="A* search structure.">ps_astar_t</a>; <a name="l00185"></a>00185 <a name="l00189"></a><a class="code" href="structastar__seg__s.html">00189</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structastar__seg__s.html" title="Segmentation &quot;iterator&quot; for A* search results.">astar_seg_s</a> { <a name="l00190"></a>00190 <a class="code" href="structps__seg__s.html" title="Base structure for hypothesis segmentation iterator.">ps_seg_t</a> base; <a name="l00191"></a>00191 <a class="code" href="structps__latnode__s.html" title="DAG nodes.">ps_latnode_t</a> **nodes; <a name="l00192"></a>00192 <span class="keywordtype">int</span> n_nodes; <a name="l00193"></a>00193 <span class="keywordtype">int</span> cur; <a name="l00194"></a>00194 } <a class="code" href="ps__lattice__internal_8h.html#ac9ad8a97a222c2fa9e5c2bb66d26d74d" title="Segmentation &quot;iterator&quot; for A* search results.">astar_seg_t</a>; <a name="l00195"></a>00195 <a name="l00199"></a>00199 <a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *<a class="code" href="ps__lattice_8c.html#a606f6ee0fd569dd5829d7f84ae7e61bd" title="Construct an empty word graph with reference to a search structure.">ps_lattice_init_search</a>(<a class="code" href="structps__search__s.html" title="Base structure for search module.">ps_search_t</a> *search, <span class="keywordtype">int</span> n_frame); <a name="l00200"></a>00200 <a name="l00204"></a>00204 <span class="keywordtype">void</span> <a class="code" href="ps__lattice_8c.html#a9b40adaa059978fe33959d59da1b6919" title="Bypass filler words.">ps_lattice_bypass_fillers</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag, int32 silpen, int32 fillpen); <a name="l00205"></a>00205 <a name="l00209"></a>00209 <span class="keywordtype">void</span> <a class="code" href="ps__lattice_8c.html#a6da4e36322aaab4d2ebe812bee9a4439" title="Remove nodes marked as unreachable.">ps_lattice_delete_unreachable</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag); <a name="l00210"></a>00210 <a name="l00214"></a>00214 <span class="keywordtype">void</span> <a class="code" href="ps__lattice_8c.html#a04896ebe0e2592bc7950d413b5d5c52e" title="Add an edge to the traversal queue.">ps_lattice_pushq</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag, <a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_t</a> *link); <a name="l00215"></a>00215 <a name="l00219"></a>00219 <a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_t</a> *<a class="code" href="ps__lattice_8c.html#a481c4d941368597e11b0af4709bd03b0" title="Remove an edge from the traversal queue.">ps_lattice_popq</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag); <a name="l00220"></a>00220 <a name="l00224"></a>00224 <span class="keywordtype">void</span> <a class="code" href="ps__lattice_8c.html#ad128ca75e8bc7ca4ba41094fb5b68ee9" title="Clear and reset the traversal queue.">ps_lattice_delq</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag); <a name="l00225"></a>00225 <a name="l00229"></a>00229 <a class="code" href="structlatlink__list__s.html" title="Linked list of DAG link pointers.">latlink_list_t</a> *<a class="code" href="ps__lattice_8c.html#a7197508af770064ea825bb812dd6eddc" title="Create a new lattice link element.">latlink_list_new</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag, <a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_t</a> *link, <a name="l00230"></a>00230 <a class="code" href="structlatlink__list__s.html" title="Linked list of DAG link pointers.">latlink_list_t</a> *next); <a name="l00231"></a>00231 <a name="l00235"></a>00235 <span class="keywordtype">char</span> <span class="keyword">const</span> *<a class="code" href="ps__lattice_8c.html#a02b07c009d23b852bd4db54700dfac5b" title="Get hypothesis string after bestpath search.">ps_lattice_hyp</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag, <a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_t</a> *link); <a name="l00236"></a>00236 <a name="l00240"></a>00240 <a class="code" href="structps__seg__s.html" title="Base structure for hypothesis segmentation iterator.">ps_seg_t</a> *<a class="code" href="ps__lattice_8c.html#afedbc5558c18f7d029e84a4e27e38187" title="Get hypothesis segmentation iterator after bestpath search.">ps_lattice_seg_iter</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag, <a class="code" href="structps__latlink__s.html" title="Links between DAG nodes.">ps_latlink_t</a> *link, <a name="l00241"></a>00241 float32 lwf); <a name="l00242"></a>00242 <a name="l00252"></a>00252 <a class="code" href="structps__astar__s.html" title="A* search structure.">ps_astar_t</a> *<a class="code" href="ps__lattice_8c.html#aaf9aedd3cd8bd1d45053e10828215a25" title="Begin N-Gram based A* search on a word graph.">ps_astar_start</a>(<a class="code" href="structps__lattice__s.html" title="Word graph structure used in bestpath/nbest search.">ps_lattice_t</a> *dag, <a name="l00253"></a>00253 ngram_model_t *lmset, <a name="l00254"></a>00254 float32 lwf, <a name="l00255"></a>00255 <span class="keywordtype">int</span> sf, <span class="keywordtype">int</span> ef, <a name="l00256"></a>00256 <span class="keywordtype">int</span> w1, <span class="keywordtype">int</span> w2); <a name="l00257"></a>00257 <a name="l00263"></a>00263 <a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_t</a> *<a class="code" href="ps__lattice_8c.html#a6bea95f8fb827af790bbe6ce1920908c" title="Find next best hypothesis of A* on a word graph.">ps_astar_next</a>(<a class="code" href="structps__astar__s.html" title="A* search structure.">ps_astar_t</a> *nbest); <a name="l00264"></a>00264 <a name="l00268"></a>00268 <span class="keywordtype">void</span> <a class="code" href="ps__lattice_8c.html#abfb03e9e0fcbe3def45120f5ba43be14" title="Finish N-best search, releasing resources associated with it.">ps_astar_finish</a>(<a class="code" href="structps__astar__s.html" title="A* search structure.">ps_astar_t</a> *nbest); <a name="l00269"></a>00269 <a name="l00273"></a>00273 <span class="keywordtype">char</span> <span class="keyword">const</span> *<a class="code" href="ps__lattice_8c.html#ac7372b5c5ec111f6814ce1ba495593e4" title="Get hypothesis string from A* search.">ps_astar_hyp</a>(<a class="code" href="structps__astar__s.html" title="A* search structure.">ps_astar_t</a> *nbest, <a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_t</a> *path); <a name="l00274"></a>00274 <a name="l00278"></a>00278 <a class="code" href="structps__seg__s.html" title="Base structure for hypothesis segmentation iterator.">ps_seg_t</a> *<a class="code" href="ps__lattice_8c.html#ac8e3dff7276c03c93377d0cb79fbdbd7" title="Get hypothesis segmentation from A* search.">ps_astar_seg_iter</a>(<a class="code" href="structps__astar__s.html" title="A* search structure.">ps_astar_t</a> *astar, <a class="code" href="structps__latpath__s.html" title="Partial path structure used in N-best (A*) search.">ps_latpath_t</a> *path, float32 lwf); <a name="l00279"></a>00279 <a name="l00280"></a>00280 <a name="l00281"></a>00281 <span class="preprocessor">#endif </span><span class="comment">/* __PS_LATTICE_INTERNAL_H__ */</span> </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="ps__lattice__internal_8h.html">ps_lattice_internal.h</a> </li> <li class="footer">Generated on Wed Apr 20 2011 for PocketSphinx by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li> </ul> </div> </body> </html>