Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e9280da098bff237733732ce38a34d57 > files > 32

pocketsphinx-devel-0.7-1.fc14.i686.rpm

<!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/dict.h File Reference</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&#160;<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&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;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&#160;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('dict_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>src/libpocketsphinx/dict.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>Operations on dictionary.  
<a href="#_details">More...</a></p>
<div class="textblock"><code>#include &lt;sphinxbase/hash_table.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="s3types_8h_source.html">s3types.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="bin__mdef_8h_source.html">bin_mdef.h</a>&quot;</code><br/>
<code>#include &quot;pocketsphinx_export.h&quot;</code><br/>
</div>
<p><a href="dict_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdictword__t.html">dictword_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">a structure for one dictionary word.  <a href="structdictword__t.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdict__t.html">dict_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">a structure for a dictionary.  <a href="structdict__t.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d8a7f13ae4607c024a3e9f0c34ba2b9"></a><!-- doxytag: member="dict.h::S3DICT_INC_SZ" ref="a8d8a7f13ae4607c024a3e9f0c34ba2b9" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S3DICT_INC_SZ</b>&#160;&#160;&#160;4096</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a361b948b42f9cfdf5c7fa9dfc8a71a94"></a><!-- doxytag: member="dict.h::dict_size" ref="a361b948b42f9cfdf5c7fa9dfc8a71a94" args="(d)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a361b948b42f9cfdf5c7fa9dfc8a71a94">dict_size</a>(d)&#160;&#160;&#160;((d)-&gt;n_word)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Packaged macro access to dictionary members. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21147dad416a87bf085b86bc32a62810"></a><!-- doxytag: member="dict.h::dict_num_fillers" ref="a21147dad416a87bf085b86bc32a62810" args="(d)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_num_fillers</b>(d)&#160;&#160;&#160;(dict_filler_end(d) - dict_filler_start(d))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a529d92f69f39e1f8c4a94e60a9509201">dict_num_real_words</a>(d)&#160;&#160;&#160;(dict_size(d) - (dict_filler_end(d) - dict_filler_start(d)) - 2)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of "real words" in the dictionary.  <a href="#a529d92f69f39e1f8c4a94e60a9509201"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ad27f5fb02c9f5dd811e0d04aca9231"></a><!-- doxytag: member="dict.h::dict_basewid" ref="a5ad27f5fb02c9f5dd811e0d04aca9231" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_basewid</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[w].basewid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a960244692f448457dbea9498108fe2d9"></a><!-- doxytag: member="dict.h::dict_wordstr" ref="a960244692f448457dbea9498108fe2d9" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_wordstr</b>(d, w)&#160;&#160;&#160;((w) &lt; 0 ? NULL : (d)-&gt;word[w].word)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a84df59782b43012dafcaebc716cbd932"></a><!-- doxytag: member="dict.h::dict_basestr" ref="a84df59782b43012dafcaebc716cbd932" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_basestr</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[dict_basewid(d,w)].word)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad28133467ed803b4219ae1452bff929c"></a><!-- doxytag: member="dict.h::dict_nextalt" ref="ad28133467ed803b4219ae1452bff929c" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_nextalt</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[w].alt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab40570a0b06cdcbc9a22d9777936e780"></a><!-- doxytag: member="dict.h::dict_pronlen" ref="ab40570a0b06cdcbc9a22d9777936e780" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_pronlen</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[w].pronlen)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8785ab6264a5c6cf0b8da6bf79a46de4"></a><!-- doxytag: member="dict.h::dict_pron" ref="a8785ab6264a5c6cf0b8da6bf79a46de4" args="(d, w, p)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a8785ab6264a5c6cf0b8da6bf79a46de4">dict_pron</a>(d, w, p)&#160;&#160;&#160;((d)-&gt;word[w].ciphone[p])</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The CI phones of the word w at position p. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa6e902650918309eb90b83cbbed96401"></a><!-- doxytag: member="dict.h::dict_filler_start" ref="aa6e902650918309eb90b83cbbed96401" args="(d)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_filler_start</b>(d)&#160;&#160;&#160;((d)-&gt;filler_start)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a236a26fcd9e5464631c563a03e05c719"></a><!-- doxytag: member="dict.h::dict_filler_end" ref="a236a26fcd9e5464631c563a03e05c719" args="(d)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_filler_end</b>(d)&#160;&#160;&#160;((d)-&gt;filler_end)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a56c28444a8e3ffeb71a3329df2509257"></a><!-- doxytag: member="dict.h::dict_startwid" ref="a56c28444a8e3ffeb71a3329df2509257" args="(d)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_startwid</b>(d)&#160;&#160;&#160;((d)-&gt;startwid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab00b6ceb46292b3c10b571d5cc7eac1d"></a><!-- doxytag: member="dict.h::dict_finishwid" ref="ab00b6ceb46292b3c10b571d5cc7eac1d" args="(d)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_finishwid</b>(d)&#160;&#160;&#160;((d)-&gt;finishwid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e35b701bf6eefd7c17436a45409b623"></a><!-- doxytag: member="dict.h::dict_silwid" ref="a3e35b701bf6eefd7c17436a45409b623" args="(d)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_silwid</b>(d)&#160;&#160;&#160;((d)-&gt;silwid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="addf34f870858c4dd751896113c6f62b4"></a><!-- doxytag: member="dict.h::dict_is_single_phone" ref="addf34f870858c4dd751896113c6f62b4" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_is_single_phone</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[w].pronlen == 1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac0e78a257dde5c082fe2053b19c7346"></a><!-- doxytag: member="dict.h::dict_first_phone" ref="aac0e78a257dde5c082fe2053b19c7346" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_first_phone</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[w].ciphone[0])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6504d5e7dcac8096894e1a8cea35b7db"></a><!-- doxytag: member="dict.h::dict_second_phone" ref="a6504d5e7dcac8096894e1a8cea35b7db" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_second_phone</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[w].ciphone[1])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75ebbbca085999e695278cc3c02895ef"></a><!-- doxytag: member="dict.h::dict_second_last_phone" ref="a75ebbbca085999e695278cc3c02895ef" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_second_last_phone</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[w].ciphone[(d)-&gt;word[w].pronlen - 2])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a47f1f648ae9d6544ec067d2a327d1316"></a><!-- doxytag: member="dict.h::dict_last_phone" ref="a47f1f648ae9d6544ec067d2a327d1316" args="(d, w)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>dict_last_phone</b>(d, w)&#160;&#160;&#160;((d)-&gt;word[w].ciphone[(d)-&gt;word[w].pronlen - 1])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a383b5d67202951a19989b0fca2e5462b"></a><!-- doxytag: member="dict.h::S3_START_WORD" ref="a383b5d67202951a19989b0fca2e5462b" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S3_START_WORD</b>&#160;&#160;&#160;&quot;&lt;s&gt;&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a22c7450ba073a0d1e1a3a2a99304d5c8"></a><!-- doxytag: member="dict.h::S3_FINISH_WORD" ref="a22c7450ba073a0d1e1a3a2a99304d5c8" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S3_FINISH_WORD</b>&#160;&#160;&#160;&quot;&lt;/s&gt;&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb3127621782f91be8536c2c95a20dd8"></a><!-- doxytag: member="dict.h::S3_SILENCE_WORD" ref="afb3127621782f91be8536c2c95a20dd8" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S3_SILENCE_WORD</b>&#160;&#160;&#160;&quot;&lt;sil&gt;&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07d5343a9b10d6f6ea885c28c5d36a4b"></a><!-- doxytag: member="dict.h::S3_UNKNOWN_WORD" ref="a07d5343a9b10d6f6ea885c28c5d36a4b" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>S3_UNKNOWN_WORD</b>&#160;&#160;&#160;&quot;&lt;UNK&gt;&quot;</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structdict__t.html">dict_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a05d8dac3e5fe5399ccb8bf7776e203e2">dict_init</a> (cmd_ln_t *config, <a class="el" href="structbin__mdef__s.html">bin_mdef_t</a> *mdef)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a new dictionary.  <a href="#a05d8dac3e5fe5399ccb8bf7776e203e2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bfa8e3b7b9ff30165375d1c97bb04b8"></a><!-- doxytag: member="dict.h::dict_write" ref="a4bfa8e3b7b9ff30165375d1c97bb04b8" args="(dict_t *dict, char const *filename, char const *format)" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a4bfa8e3b7b9ff30165375d1c97bb04b8">dict_write</a> (<a class="el" href="structdict__t.html">dict_t</a> *dict, char const *filename, char const *format)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write dictionary to a file. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">POCKETSPHINX_EXPORT s3wid_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#ad3729eb1a02a9a321e17933f7e90c80e">dict_wordid</a> (<a class="el" href="structdict__t.html">dict_t</a> *d, const char *word)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return word id for given word string if present.  <a href="#ad3729eb1a02a9a321e17933f7e90c80e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#aa5cade4dc6464c620718b86344540aff">dict_filler_word</a> (<a class="el" href="structdict__t.html">dict_t</a> *d, s3wid_t w)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return 1 if w is a filler word, 0 if not.  <a href="#aa5cade4dc6464c620718b86344540aff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">POCKETSPHINX_EXPORT int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#ad2eba4ca92dd1a3721608e003d95d8c1">dict_real_word</a> (<a class="el" href="structdict__t.html">dict_t</a> *d, s3wid_t w)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if w is a "real" word, i.e.  <a href="#ad2eba4ca92dd1a3721608e003d95d8c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">s3wid_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a24888ac8e24259e553c43c4655b38432">dict_add_word</a> (<a class="el" href="structdict__t.html">dict_t</a> *d, char const *word, <a class="el" href="s3types_8h.html#ae5f70241ce62a79747f0611029a6409d">s3cipid_t</a> const *p, int32 np)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a word with the given ciphone pronunciation list to the dictionary.  <a href="#a24888ac8e24259e553c43c4655b38432"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a8587d077f5303554df0e26a181bfb0bf">dict_ciphone_str</a> (<a class="el" href="structdict__t.html">dict_t</a> *d, s3wid_t wid, int32 pos)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return value: CI phone string for the given word, phone position.  <a href="#a8587d077f5303554df0e26a181bfb0bf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a3a128531ae9c077be9882119ed05fe3a">dict_word2basestr</a> (char *word)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">If the given word contains a trailing "(....)" (i.e., a Sphinx-II style alternative pronunciation specification), strip that trailing portion from it.  <a href="#a3a128531ae9c077be9882119ed05fe3a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0edf70be186e8940af9d21243083cb8b"></a><!-- doxytag: member="dict.h::dict_retain" ref="a0edf70be186e8940af9d21243083cb8b" args="(dict_t *d)" -->
<a class="el" href="structdict__t.html">dict_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a0edf70be186e8940af9d21243083cb8b">dict_retain</a> (<a class="el" href="structdict__t.html">dict_t</a> *d)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Retain a pointer to an <a class="el" href="structdict__t.html" title="a structure for a dictionary.">dict_t</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a51ee6c067decce8dbc182f95f7b33e91"></a><!-- doxytag: member="dict.h::dict_free" ref="a51ee6c067decce8dbc182f95f7b33e91" args="(dict_t *d)" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a51ee6c067decce8dbc182f95f7b33e91">dict_free</a> (<a class="el" href="structdict__t.html">dict_t</a> *d)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Release a pointer to a dictionary. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dict_8h.html#a41cca433a75fd2663bee115296639666">dict_report</a> (<a class="el" href="structdict__t.html">dict_t</a> *d)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Report a dictionary structure.  <a href="#a41cca433a75fd2663bee115296639666"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Operations on dictionary. </p>

<p>Definition in file <a class="el" href="dict_8h_source.html">dict.h</a>.</p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="a529d92f69f39e1f8c4a94e60a9509201"></a><!-- doxytag: member="dict.h::dict_num_real_words" ref="a529d92f69f39e1f8c4a94e60a9509201" args="(d)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define dict_num_real_words</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">d</td><td>)</td>
          <td>&#160;&#160;&#160;(dict_size(d) - (dict_filler_end(d) - dict_filler_start(d)) - 2)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Number of "real words" in the dictionary. </p>
<p>This is the number of words that are not fillers, &lt;s&gt;, or &lt;/s&gt;. </p>

<p>Definition at line <a class="el" href="dict_8h_source.html#l00161">161</a> of file <a class="el" href="dict_8h_source.html">dict.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a24888ac8e24259e553c43c4655b38432"></a><!-- doxytag: member="dict.h::dict_add_word" ref="a24888ac8e24259e553c43c4655b38432" args="(dict_t *d, char const *word, s3cipid_t const *p, int32 np)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">s3wid_t dict_add_word </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdict__t.html">dict_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>word</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="s3types_8h.html#ae5f70241ce62a79747f0611029a6409d">s3cipid_t</a> const *&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32&#160;</td>
          <td class="paramname"><em>np</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a word with the given ciphone pronunciation list to the dictionary. </p>
<p>Return value: Result word id if successful, BAD_S3WID otherwise </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>The dictionary structure. </td></tr>
    <tr><td class="paramname">word</td><td>The word. </td></tr>
    <tr><td class="paramname">p</td><td>The pronunciation. </td></tr>
    <tr><td class="paramname">np</td><td>Number of phones. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="dict_8c_source.html#l00080">80</a> of file <a class="el" href="dict_8c_source.html">dict.c</a>.</p>

<p>References <a class="el" href="dict_8h_source.html#l00070">dictword_t::alt</a>, <a class="el" href="s3types_8h_source.html#l00136">BAD_S3WID</a>, <a class="el" href="dict_8h_source.html#l00071">dictword_t::basewid</a>, <a class="el" href="dict_8h_source.html#l00068">dictword_t::ciphone</a>, <a class="el" href="dict_8h_source.html#l00083">dict_t::ht</a>, <a class="el" href="dict_8h_source.html#l00084">dict_t::max_words</a>, <a class="el" href="dict_8h_source.html#l00085">dict_t::n_word</a>, <a class="el" href="dict_8h_source.html#l00069">dictword_t::pronlen</a>, <a class="el" href="dict_8h_source.html#l00067">dictword_t::word</a>, and <a class="el" href="dict_8h_source.html#l00082">dict_t::word</a>.</p>

</div>
</div>
<a class="anchor" id="a8587d077f5303554df0e26a181bfb0bf"></a><!-- doxytag: member="dict.h::dict_ciphone_str" ref="a8587d077f5303554df0e26a181bfb0bf" args="(dict_t *d, s3wid_t wid, int32 pos)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* dict_ciphone_str </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdict__t.html">dict_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">s3wid_t&#160;</td>
          <td class="paramname"><em>wid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32&#160;</td>
          <td class="paramname"><em>pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return value: CI phone string for the given word, phone position. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>In: Dictionary to look up </td></tr>
    <tr><td class="paramname">wid</td><td>In: Component word being looked up </td></tr>
    <tr><td class="paramname">pos</td><td>In: Pronunciation phone position </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="dict_8c_source.html#l00069">69</a> of file <a class="el" href="dict_8c_source.html">dict.c</a>.</p>

<p>References <a class="el" href="dict_8h_source.html#l00068">dictword_t::ciphone</a>, <a class="el" href="dict_8h_source.html#l00081">dict_t::mdef</a>, and <a class="el" href="dict_8h_source.html#l00082">dict_t::word</a>.</p>

</div>
</div>
<a class="anchor" id="aa5cade4dc6464c620718b86344540aff"></a><!-- doxytag: member="dict.h::dict_filler_word" ref="aa5cade4dc6464c620718b86344540aff" args="(dict_t *d, s3wid_t w)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dict_filler_word </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdict__t.html">dict_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">s3wid_t&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return 1 if w is a filler word, 0 if not. </p>
<p>A filler word is one that was read in from the filler dictionary; however, sentence START and FINISH words are not filler words. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>The dictionary structure </td></tr>
    <tr><td class="paramname">w</td><td>The word ID </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="dict_8c_source.html#l00382">382</a> of file <a class="el" href="dict_8c_source.html">dict.c</a>.</p>

<p>References <a class="el" href="dict_8h_source.html#l00086">dict_t::filler_start</a>, <a class="el" href="dict_8h_source.html#l00089">dict_t::finishwid</a>, and <a class="el" href="dict_8h_source.html#l00088">dict_t::startwid</a>.</p>

</div>
</div>
<a class="anchor" id="a05d8dac3e5fe5399ccb8bf7776e203e2"></a><!-- doxytag: member="dict.h::dict_init" ref="a05d8dac3e5fe5399ccb8bf7776e203e2" args="(cmd_ln_t *config, bin_mdef_t *mdef)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structdict__t.html">dict_t</a>* dict_init </td>
          <td>(</td>
          <td class="paramtype">cmd_ln_t *&#160;</td>
          <td class="paramname"><em>config</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structbin__mdef__s.html">bin_mdef_t</a> *&#160;</td>
          <td class="paramname"><em>mdef</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize a new dictionary. </p>
<p>If config and mdef are supplied, then the dictionary will be read from the files specified by the -dict and -fdict options in config, with case sensitivity determined by the -dictcase option.</p>
<p>Otherwise an empty case-sensitive dictionary will be created.</p>
<p>Return ptr to <a class="el" href="structdict__t.html" title="a structure for a dictionary.">dict_t</a> if successful, NULL otherwise. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td>Configuration (-dict, -fdict, -dictcase) or NULL </td></tr>
    <tr><td class="paramname">mdef</td><td>For looking up CI phone IDs (or NULL) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="dict_8c_source.html#l00252">252</a> of file <a class="el" href="dict_8c_source.html">dict.c</a>.</p>

<p>References <a class="el" href="s3types_8h_source.html#l00136">BAD_S3WID</a>, <a class="el" href="dict_8h_source.html#l00087">dict_t::filler_end</a>, <a class="el" href="dict_8h_source.html#l00086">dict_t::filler_start</a>, <a class="el" href="dict_8h_source.html#l00089">dict_t::finishwid</a>, <a class="el" href="dict_8h_source.html#l00083">dict_t::ht</a>, <a class="el" href="dict_8h_source.html#l00084">dict_t::max_words</a>, <a class="el" href="dict_8h_source.html#l00081">dict_t::mdef</a>, <a class="el" href="dict_8h_source.html#l00085">dict_t::n_word</a>, <a class="el" href="dict_8h_source.html#l00090">dict_t::silwid</a>, <a class="el" href="dict_8h_source.html#l00088">dict_t::startwid</a>, and <a class="el" href="dict_8h_source.html#l00082">dict_t::word</a>.</p>

</div>
</div>
<a class="anchor" id="ad2eba4ca92dd1a3721608e003d95d8c1"></a><!-- doxytag: member="dict.h::dict_real_word" ref="ad2eba4ca92dd1a3721608e003d95d8c1" args="(dict_t *d, s3wid_t w)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">POCKETSPHINX_EXPORT int dict_real_word </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdict__t.html">dict_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">s3wid_t&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Test if w is a "real" word, i.e. </p>
<p>neither a filler word nor START/FINISH. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>The dictionary structure </td></tr>
    <tr><td class="paramname">w</td><td>The word ID </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="dict_8c_source.html#l00396">396</a> of file <a class="el" href="dict_8c_source.html">dict.c</a>.</p>

<p>References <a class="el" href="dict_8h_source.html#l00086">dict_t::filler_start</a>, <a class="el" href="dict_8h_source.html#l00089">dict_t::finishwid</a>, and <a class="el" href="dict_8h_source.html#l00088">dict_t::startwid</a>.</p>

</div>
</div>
<a class="anchor" id="a41cca433a75fd2663bee115296639666"></a><!-- doxytag: member="dict.h::dict_report" ref="a41cca433a75fd2663bee115296639666" args="(dict_t *d)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dict_report </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdict__t.html">dict_t</a> *&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Report a dictionary structure. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>A dictionary structure </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="dict_8c_source.html#l00468">468</a> of file <a class="el" href="dict_8c_source.html">dict.c</a>.</p>

<p>References <a class="el" href="dict_8h_source.html#l00084">dict_t::max_words</a>, and <a class="el" href="dict_8h_source.html#l00085">dict_t::n_word</a>.</p>

</div>
</div>
<a class="anchor" id="a3a128531ae9c077be9882119ed05fe3a"></a><!-- doxytag: member="dict.h::dict_word2basestr" ref="a3a128531ae9c077be9882119ed05fe3a" args="(char *word)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32 dict_word2basestr </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>word</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>If the given word contains a trailing "(....)" (i.e., a Sphinx-II style alternative pronunciation specification), strip that trailing portion from it. </p>
<p>Note that the given string is modified. Return value: If string was modified, the character position at which the original string was truncated; otherwise -1. </p>

<p>Definition at line <a class="el" href="dict_8c_source.html#l00411">411</a> of file <a class="el" href="dict_8c_source.html">dict.c</a>.</p>

</div>
</div>
<a class="anchor" id="ad3729eb1a02a9a321e17933f7e90c80e"></a><!-- doxytag: member="dict.h::dict_wordid" ref="ad3729eb1a02a9a321e17933f7e90c80e" args="(dict_t *d, const char *word)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">POCKETSPHINX_EXPORT s3wid_t dict_wordid </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdict__t.html">dict_t</a> *&#160;</td>
          <td class="paramname"><em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>word</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return word id for given word string if present. </p>
<p>Otherwise return BAD_S3WID </p>

<p>Definition at line <a class="el" href="dict_8c_source.html#l00368">368</a> of file <a class="el" href="dict_8c_source.html">dict.c</a>.</p>

<p>References <a class="el" href="s3types_8h_source.html#l00136">BAD_S3WID</a>, and <a class="el" href="dict_8h_source.html#l00083">dict_t::ht</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dict_8h.html">dict.h</a>      </li>
      <li class="footer">Generated on Wed Apr 20 2011 for PocketSphinx by&#160;
<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>