<!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/bin_mdef.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('bin__mdef_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <h1>src/libpocketsphinx/bin_mdef.h</h1> </div> </div> <div class="contents"> <a href="bin__mdef_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-file-style: "linux" -*- */</span> <a name="l00002"></a>00002 <span class="comment">/* ====================================================================</span> <a name="l00003"></a>00003 <span class="comment"> * Copyright (c) 2005 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="l00045"></a>00045 <span class="preprocessor">#ifndef __BIN_MDEF_H__</span> <a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define __BIN_MDEF_H__</span> <a name="l00047"></a>00047 <span class="preprocessor"></span> <a name="l00048"></a>00048 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00049"></a>00049 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { <a name="l00050"></a>00050 <span class="preprocessor">#if 0</span> <a name="l00051"></a>00051 <span class="preprocessor"></span>}; <span class="comment">/* Fool Emacs */</span> <a name="l00052"></a>00052 <span class="preprocessor">#endif</span> <a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="comment">/* SphinxBase headers. */</span> <a name="l00056"></a>00056 <span class="preprocessor">#include <sphinxbase/mmio.h></span> <a name="l00057"></a>00057 <span class="preprocessor">#include <sphinxbase/cmd_ln.h></span> <a name="l00058"></a>00058 <a name="l00059"></a>00059 <span class="preprocessor">#include "<a class="code" href="mdef_8h.html" title="Model definition.">mdef.h</a>"</span> <a name="l00060"></a>00060 <a name="l00061"></a>00061 <span class="preprocessor">#define BIN_MDEF_FORMAT_VERSION 1</span> <a name="l00062"></a>00062 <span class="preprocessor"></span><span class="comment">/* Little-endian machines will write "BMDF" to disk, big-endian ones "FDMB". */</span> <a name="l00063"></a>00063 <span class="preprocessor">#define BIN_MDEF_NATIVE_ENDIAN 0x46444d42 </span><span class="comment">/* 'BMDF' in little-endian order */</span> <a name="l00064"></a>00064 <span class="preprocessor">#define BIN_MDEF_OTHER_ENDIAN 0x424d4446 </span><span class="comment">/* 'BMDF' in big-endian order */</span> <a name="l00065"></a>00065 <span class="preprocessor">#ifdef __GNUC__</span> <a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define ATTRIBUTE_PACKED __attribute__((packed))</span> <a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#define ATTRIBUTE_PACKED</span> <a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00070"></a>00070 <span class="preprocessor"></span> <a name="l00074"></a><a class="code" href="bin__mdef_8h.html#a424238fea86ab5ecfc89ca0cc885ad38">00074</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structmdef__entry__s.html">mdef_entry_s</a> <a class="code" href="structmdef__entry__s.html">mdef_entry_t</a>; <a name="l00075"></a><a class="code" href="structmdef__entry__s.html">00075</a> <span class="keyword">struct </span><a class="code" href="structmdef__entry__s.html">mdef_entry_s</a> { <a name="l00076"></a><a class="code" href="structmdef__entry__s.html#a12986649de9c59de3cc805e375b2c9a2">00076</a> int32 <a class="code" href="structmdef__entry__s.html#a12986649de9c59de3cc805e375b2c9a2" title="Senone sequence ID.">ssid</a>; <a name="l00077"></a><a class="code" href="structmdef__entry__s.html#a90758df5d6eb00d3a70135ac4475c7a1">00077</a> int32 <a class="code" href="structmdef__entry__s.html#a90758df5d6eb00d3a70135ac4475c7a1" title="Transition matrix ID.">tmat</a>; <a name="l00078"></a>00078 <span class="comment">/* FIXME: is any of this actually necessary? */</span> <a name="l00079"></a>00079 <span class="keyword">union </span>{ <a name="l00081"></a>00081 <span class="keyword">struct </span>{ <a name="l00082"></a>00082 int8 filler; <a name="l00083"></a>00083 int8 reserved[3]; <a name="l00084"></a>00084 } <a class="code" href="structmdef__entry__s.html#a24e5db7af5e705b310e82154055043ec" title="CD phone information - context info.">ci</a>; <a name="l00086"></a>00086 <span class="keyword">struct </span>{ <a name="l00087"></a>00087 int8 wpos; <a name="l00088"></a><a class="code" href="structmdef__entry__s.html#a6e067e9a0011690f3afdab9ed8279555">00088</a> int8 <a class="code" href="structmdef__entry__s.html#a6e067e9a0011690f3afdab9ed8279555" title="quintphones will require hacking">ctx</a>[3]; <a name="l00089"></a>00089 } cd; <a name="l00090"></a>00090 } info; <a name="l00091"></a>00091 } ATTRIBUTE_PACKED; <a name="l00092"></a>00092 <a name="l00096"></a><a class="code" href="bin__mdef_8h.html#a8ee283c316e9f4aa8e6d18c1d44026bc">00096</a> <span class="preprocessor">#define BAD_SSID 0xffff</span> <a name="l00097"></a>00097 <span class="preprocessor"></span> <a name="l00100"></a><a class="code" href="bin__mdef_8h.html#ab6c771eca798ab8c94e0933a1f8daafc">00100</a> <span class="preprocessor">#define BAD_SENID 0xffff</span> <a name="l00101"></a>00101 <span class="preprocessor"></span> <a name="l00105"></a><a class="code" href="bin__mdef_8h.html#a8cf08e6d9d721c8cf5911f2c3f722645">00105</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structcd__tree__s.html">cd_tree_s</a> <a class="code" href="structcd__tree__s.html">cd_tree_t</a>; <a name="l00106"></a><a class="code" href="structcd__tree__s.html">00106</a> <span class="keyword">struct </span><a class="code" href="structcd__tree__s.html">cd_tree_s</a> { <a name="l00107"></a><a class="code" href="structcd__tree__s.html#a2168538bf6cc21ad1a2c99fa2deb4559">00107</a> int16 <a class="code" href="structcd__tree__s.html#a2168538bf6cc21ad1a2c99fa2deb4559" title="Context (word position or CI phone)">ctx</a>; <a name="l00108"></a><a class="code" href="structcd__tree__s.html#ae5e735d325b0f278ff2ad55293faa616">00108</a> int16 <a class="code" href="structcd__tree__s.html#ae5e735d325b0f278ff2ad55293faa616" title="Number of children (0 for leafnode)">n_down</a>; <a name="l00109"></a>00109 <span class="keyword">union </span>{ <a name="l00110"></a><a class="code" href="structcd__tree__s.html#a6635c35ad6fe74ad045389c76349016d">00110</a> int32 <a class="code" href="structcd__tree__s.html#a6635c35ad6fe74ad045389c76349016d" title="Phone ID (leafnode)">pid</a>; <a name="l00111"></a><a class="code" href="structcd__tree__s.html#aa536f1cbd93e2cded1238b39b8aa3751">00111</a> int32 <a class="code" href="structcd__tree__s.html#aa536f1cbd93e2cded1238b39b8aa3751" title="Next level of the tree (offset from start of cd_trees)">down</a>; <a name="l00112"></a>00112 } c; <a name="l00113"></a>00113 }; <a name="l00114"></a>00114 <a name="l00118"></a><a class="code" href="bin__mdef_8h.html#a269082d84ae254593b79f1eafe9b2d12">00118</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structbin__mdef__s.html">bin_mdef_s</a> <a class="code" href="structbin__mdef__s.html">bin_mdef_t</a>; <a name="l00119"></a><a class="code" href="structbin__mdef__s.html">00119</a> <span class="keyword">struct </span><a class="code" href="structbin__mdef__s.html">bin_mdef_s</a> { <a name="l00120"></a>00120 <span class="keywordtype">int</span> refcnt; <a name="l00121"></a><a class="code" href="structbin__mdef__s.html#a84d5f7acc6d85ba8c7611945f9c5e4e7">00121</a> int32 <a class="code" href="structbin__mdef__s.html#a84d5f7acc6d85ba8c7611945f9c5e4e7" title="Number of base (CI) phones.">n_ciphone</a>; <a name="l00122"></a><a class="code" href="structbin__mdef__s.html#ad746dbb3f8108f575a95182f96b4b18f">00122</a> int32 <a class="code" href="structbin__mdef__s.html#ad746dbb3f8108f575a95182f96b4b18f" title="Number of base (CI) phones + (CD) triphones.">n_phone</a>; <a name="l00123"></a><a class="code" href="structbin__mdef__s.html#a2ad87254182be424ac6ff1234274f134">00123</a> int32 <a class="code" href="structbin__mdef__s.html#a2ad87254182be424ac6ff1234274f134" title="Number of emitting states per phone (0 for heterogeneous)">n_emit_state</a>; <a name="l00124"></a><a class="code" href="structbin__mdef__s.html#ad7c318d6db85fd4b8ac13a81c145bbb8">00124</a> int32 <a class="code" href="structbin__mdef__s.html#ad7c318d6db85fd4b8ac13a81c145bbb8" title="Number of CI senones; these are the first.">n_ci_sen</a>; <a name="l00125"></a><a class="code" href="structbin__mdef__s.html#a3d1c202165d8e5e153a73d708ca28109">00125</a> int32 <a class="code" href="structbin__mdef__s.html#a3d1c202165d8e5e153a73d708ca28109" title="Number of senones (CI+CD)">n_sen</a>; <a name="l00126"></a><a class="code" href="structbin__mdef__s.html#a979557ad4f8369e84d93f633512345ca">00126</a> int32 <a class="code" href="structbin__mdef__s.html#a979557ad4f8369e84d93f633512345ca" title="Number of transition matrices.">n_tmat</a>; <a name="l00127"></a><a class="code" href="structbin__mdef__s.html#ab9dad211cbc12eb6f848482bcf78d47f">00127</a> int32 <a class="code" href="structbin__mdef__s.html#ab9dad211cbc12eb6f848482bcf78d47f" title="Number of unique senone sequences.">n_sseq</a>; <a name="l00128"></a><a class="code" href="structbin__mdef__s.html#a31b5cda5136c6f72816da8889719bfe2">00128</a> int32 <a class="code" href="structbin__mdef__s.html#a31b5cda5136c6f72816da8889719bfe2" title="Number of phones of context.">n_ctx</a>; <a name="l00129"></a><a class="code" href="structbin__mdef__s.html#ad625c3c55d5f42ed275b8b5638a6d80b">00129</a> int32 <a class="code" href="structbin__mdef__s.html#ad625c3c55d5f42ed275b8b5638a6d80b" title="Number of nodes in cd_tree (below)">n_cd_tree</a>; <a name="l00130"></a><a class="code" href="structbin__mdef__s.html#a9071b7698132c1c2ce92a6f742e1c82f">00130</a> int16 <a class="code" href="structbin__mdef__s.html#a9071b7698132c1c2ce92a6f742e1c82f" title="CI phone ID for silence.">sil</a>; <a name="l00132"></a><a class="code" href="structbin__mdef__s.html#a3358a80c50bf3f62417596553adf9c5e">00132</a> mmio_file_t *<a class="code" href="structbin__mdef__s.html#a3358a80c50bf3f62417596553adf9c5e" title="File map for this file (if any)">filemap</a>; <a name="l00133"></a><a class="code" href="structbin__mdef__s.html#afdd0df913746b0656186fc8c3e8a9206">00133</a> <span class="keywordtype">char</span> **<a class="code" href="structbin__mdef__s.html#afdd0df913746b0656186fc8c3e8a9206" title="CI phone names.">ciname</a>; <a name="l00134"></a><a class="code" href="structbin__mdef__s.html#a0642be2bb56149689ad3fc1dad1e5d55">00134</a> <a class="code" href="structcd__tree__s.html">cd_tree_t</a> *<a class="code" href="structbin__mdef__s.html#a0642be2bb56149689ad3fc1dad1e5d55" title="Tree mapping CD phones to phone IDs.">cd_tree</a>; <a name="l00135"></a><a class="code" href="structbin__mdef__s.html#a2c73ae900d198460a30bce4f641d8398">00135</a> <a class="code" href="structmdef__entry__s.html">mdef_entry_t</a> *<a class="code" href="structbin__mdef__s.html#a2c73ae900d198460a30bce4f641d8398" title="All phone structures.">phone</a>; <a name="l00136"></a><a class="code" href="structbin__mdef__s.html#acb58480658812de7a357dcbd25ad7b41">00136</a> uint16 **<a class="code" href="structbin__mdef__s.html#acb58480658812de7a357dcbd25ad7b41" title="Unique senone sequences (2D array built at load time)">sseq</a>; <a name="l00137"></a><a class="code" href="structbin__mdef__s.html#ab534bbd280015795b8e8ca4e296f4946">00137</a> uint8 *<a class="code" href="structbin__mdef__s.html#ab534bbd280015795b8e8ca4e296f4946" title="Number of states in each sseq (NULL for homogeneous)">sseq_len</a>; <a name="l00139"></a>00139 <span class="comment">/* These two are not stored on disk, but are generated at load time. */</span> <a name="l00140"></a><a class="code" href="structbin__mdef__s.html#ad5e814ffa116c85d46359e3ffd40bff7">00140</a> int16 *<a class="code" href="structbin__mdef__s.html#ad5e814ffa116c85d46359e3ffd40bff7" title="Parent CI-senone id for each senone.">cd2cisen</a>; <a name="l00141"></a><a class="code" href="structbin__mdef__s.html#a457e5352e52a57de5d1536bcd6b331a9">00141</a> int16 *<a class="code" href="structbin__mdef__s.html#a457e5352e52a57de5d1536bcd6b331a9" title="Parent CI-phone for each senone (CI or CD)">sen2cimap</a>; <a name="l00144"></a>00144 <span class="keyword">enum</span> { BIN_MDEF_FROM_TEXT, BIN_MDEF_IN_MEMORY, BIN_MDEF_ON_DISK } alloc_mode; <a name="l00145"></a>00145 }; <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="preprocessor">#define bin_mdef_is_fillerphone(m,p) (((p) < (m)->n_ciphone) \</span> <a name="l00148"></a>00148 <span class="preprocessor"> ? (m)->phone[p].info.ci.filler \</span> <a name="l00149"></a>00149 <span class="preprocessor"> : (m)->phone[(m)->phone[p].info.cd.ctx[0]].info.ci.filler)</span> <a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_is_ciphone(m,p) ((p) < (m)->n_ciphone)</span> <a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_n_ciphone(m) ((m)->n_ciphone)</span> <a name="l00152"></a>00152 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_n_phone(m) ((m)->n_phone)</span> <a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_n_sseq(m) ((m)->n_sseq)</span> <a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_n_emit_state(m) ((m)->n_emit_state)</span> <a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_n_emit_state_phone(m,p) ((m)->n_emit_state ? (m)->n_emit_state \</span> <a name="l00156"></a>00156 <span class="preprocessor"> : (m)->sseq_len[(m)->phone[p].ssid])</span> <a name="l00157"></a>00157 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_n_sen(m) ((m)->n_sen)</span> <a name="l00158"></a>00158 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_n_tmat(m) ((m)->n_tmat)</span> <a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_pid2ssid(m,p) ((m)->phone[p].ssid)</span> <a name="l00160"></a>00160 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_pid2tmatid(m,p) ((m)->phone[p].tmat)</span> <a name="l00161"></a>00161 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_silphone(m) ((m)->sil)</span> <a name="l00162"></a>00162 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_sen2cimap(m,s) ((m)->sen2cimap[s])</span> <a name="l00163"></a>00163 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_sseq2sen(m,ss,pos) ((m)->sseq[ss][pos])</span> <a name="l00164"></a>00164 <span class="preprocessor"></span><span class="preprocessor">#define bin_mdef_pid2ci(m,p) (((p) < (m)->n_ciphone) ? (p) \</span> <a name="l00165"></a>00165 <span class="preprocessor"> : (m)->phone[p].info.cd.ctx[0])</span> <a name="l00166"></a>00166 <span class="preprocessor"></span> <a name="l00170"></a>00170 <a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *bin_mdef_read(cmd_ln_t *config, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename); <a name="l00174"></a>00174 <a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *bin_mdef_read_text(cmd_ln_t *config, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename); <a name="l00178"></a>00178 <span class="keywordtype">int</span> bin_mdef_write(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename); <a name="l00182"></a>00182 <span class="keywordtype">int</span> bin_mdef_write_text(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename); <a name="l00186"></a>00186 <a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *bin_mdef_retain(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m); <a name="l00190"></a>00190 <span class="keywordtype">int</span> bin_mdef_free(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m); <a name="l00191"></a>00191 <a name="l00196"></a>00196 <span class="keywordtype">int</span> bin_mdef_ciphone_id(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m, <a name="l00197"></a>00197 <span class="keyword">const</span> <span class="keywordtype">char</span> *ciphone); <a name="l00203"></a>00203 <span class="keywordtype">int</span> bin_mdef_ciphone_id_nocase(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m, <a name="l00204"></a>00204 <span class="keyword">const</span> <span class="keywordtype">char</span> *ciphone); <a name="l00206"></a>00206 <span class="comment">/* Return value: READ-ONLY ciphone string name for the given ciphone id */</span> <a name="l00207"></a>00207 <span class="keyword">const</span> <span class="keywordtype">char</span> *bin_mdef_ciphone_str(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m, <a name="l00208"></a>00208 int32 ci); <a name="l00210"></a>00210 <span class="comment">/* Return value: phone id for the given constituents if found, else -1 */</span> <a name="l00211"></a>00211 <span class="keywordtype">int</span> bin_mdef_phone_id(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m, <a name="l00212"></a>00212 int32 b, <a name="l00213"></a>00213 int32 l, <a name="l00214"></a>00214 int32 r, <a name="l00215"></a>00215 int32 pos); <a name="l00217"></a>00217 <span class="comment">/* Look up a phone id, backing off to other word positions. */</span> <a name="l00218"></a>00218 <span class="keywordtype">int</span> bin_mdef_phone_id_nearest(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> * m, int32 b, <a name="l00219"></a>00219 int32 l, int32 r, int32 pos); <a name="l00220"></a>00220 <a name="l00226"></a>00226 <span class="keywordtype">int</span> bin_mdef_phone_str(<a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *m, <a name="l00227"></a>00227 <span class="keywordtype">int</span> pid, <a name="l00228"></a>00228 <span class="keywordtype">char</span> *buf); <a name="l00230"></a>00230 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00231"></a>00231 <span class="preprocessor"></span>}; <span class="comment">/* extern "C" */</span> <a name="l00232"></a>00232 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span> <a name="l00233"></a>00233 <a name="l00234"></a>00234 <span class="preprocessor">#endif </span><span class="comment">/* __BIN_MDEF_H__ */</span> </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="bin__mdef_8h.html">bin_mdef.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>