<!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: include/fsg_set.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 <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('fsg__set_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#typedef-members">Typedefs</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <h1>include/fsg_set.h File Reference</h1> </div> </div> <div class="contents"> <p>Public functions for FSG decoding. <a href="#_details">More...</a></p> <div class="textblock"><code>#include <sphinxbase/fsg_model.h></code><br/> <code>#include <sphinxbase/hash_table.h></code><br/> <code>#include <sphinxbase/jsgf.h></code><br/> <code>#include <pocketsphinx_export.h></code><br/> </div> <p><a href="fsg__set_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="typedef-members"></a> Typedefs</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2af506620f0690db7ed8b09719532e4c"></a><!-- doxytag: member="fsg_set.h::fsg_set_t" ref="a2af506620f0690db7ed8b09719532e4c" args="" --> typedef struct <a class="el" href="structfsg__search__s.html">fsg_search_s</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#a2af506620f0690db7ed8b09719532e4c">fsg_set_t</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set of finite-state grammars used in decoding. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb8eed644c915f0599dc2cce38767b70"></a><!-- doxytag: member="fsg_set.h::fsg_set_iter_t" ref="abb8eed644c915f0599dc2cce38767b70" args="" --> typedef hash_iter_t </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#abb8eed644c915f0599dc2cce38767b70">fsg_set_iter_t</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Iterator over finite-state grammars. <br/></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="anchor" id="ae258fe4457affc6de5548330f33470ca"></a><!-- doxytag: member="fsg_set.h::fsg_set_iter" ref="ae258fe4457affc6de5548330f33470ca" args="(fsg_set_t *fsgs)" --> POCKETSPHINX_EXPORT <br class="typebreak"/> <a class="el" href="fsg__set_8h.html#abb8eed644c915f0599dc2cce38767b70">fsg_set_iter_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#ae258fe4457affc6de5548330f33470ca">fsg_set_iter</a> (<a class="el" href="structfsg__search__s.html">fsg_set_t</a> *fsgs)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get an iterator over all finite-state grammars in a set. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a50a455ce026c87a66d85363e874e982d"></a><!-- doxytag: member="fsg_set.h::fsg_set_iter_next" ref="a50a455ce026c87a66d85363e874e982d" args="(fsg_set_iter_t *itor)" --> POCKETSPHINX_EXPORT <br class="typebreak"/> <a class="el" href="fsg__set_8h.html#abb8eed644c915f0599dc2cce38767b70">fsg_set_iter_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#a50a455ce026c87a66d85363e874e982d">fsg_set_iter_next</a> (<a class="el" href="fsg__set_8h.html#abb8eed644c915f0599dc2cce38767b70">fsg_set_iter_t</a> *itor)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Advance an iterator to the next grammar in the set. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a139c12323411b8366c66e97e112ca8c1"></a><!-- doxytag: member="fsg_set.h::fsg_set_iter_fsg" ref="a139c12323411b8366c66e97e112ca8c1" args="(fsg_set_iter_t *itor)" --> POCKETSPHINX_EXPORT fsg_model_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#a139c12323411b8366c66e97e112ca8c1">fsg_set_iter_fsg</a> (<a class="el" href="fsg__set_8h.html#abb8eed644c915f0599dc2cce38767b70">fsg_set_iter_t</a> *itor)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current rule in an FSG iterator. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4e31d748ffd9d99fc626c2a1036c3699"></a><!-- doxytag: member="fsg_set.h::fsg_set_iter_free" ref="a4e31d748ffd9d99fc626c2a1036c3699" args="(fsg_set_iter_t *itor)" --> POCKETSPHINX_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#a4e31d748ffd9d99fc626c2a1036c3699">fsg_set_iter_free</a> (<a class="el" href="fsg__set_8h.html#abb8eed644c915f0599dc2cce38767b70">fsg_set_iter_t</a> *itor)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Free an FSG iterator (if the end hasn't been reached). <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">POCKETSPHINX_EXPORT fsg_model_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#a91e2b8cba4e0ba30478260c18a36ed26">fsg_set_get_fsg</a> (<a class="el" href="structfsg__search__s.html">fsg_set_t</a> *fsgs, char const *name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Lookup the FSG associated with the given name. <a href="#a91e2b8cba4e0ba30478260c18a36ed26"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">POCKETSPHINX_EXPORT fsg_model_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#a283d0bc1d33f1f6d961bdfbb7939b853">fsg_set_add</a> (<a class="el" href="structfsg__search__s.html">fsg_set_t</a> *fsgs, char const *name, fsg_model_t *wfsg)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add the given FSG to the collection of FSGs known to this search object. <a href="#a283d0bc1d33f1f6d961bdfbb7939b853"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac46a51a7d298277e978821bb61236062"></a><!-- doxytag: member="fsg_set.h::fsg_set_remove" ref="ac46a51a7d298277e978821bb61236062" args="(fsg_set_t *fsgs, fsg_model_t *wfsg)" --> POCKETSPHINX_EXPORT fsg_model_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#ac46a51a7d298277e978821bb61236062">fsg_set_remove</a> (<a class="el" href="structfsg__search__s.html">fsg_set_t</a> *fsgs, fsg_model_t *wfsg)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Delete the given FSG from the known collection. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a48e53ea0b48930ab48a445240162746d"></a><!-- doxytag: member="fsg_set.h::fsg_set_remove_byname" ref="a48e53ea0b48930ab48a445240162746d" args="(fsg_set_t *fsgs, char const *name)" --> POCKETSPHINX_EXPORT fsg_model_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#a48e53ea0b48930ab48a445240162746d">fsg_set_remove_byname</a> (<a class="el" href="structfsg__search__s.html">fsg_set_t</a> *fsgs, char const *name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Like fsg_set_del_fsg(), but identifies the FSG by its name. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">POCKETSPHINX_EXPORT fsg_model_t * </td><td class="memItemRight" valign="bottom"><a class="el" href="fsg__set_8h.html#afbd05e7638e6a947fb056cc46dfb8fcb">fsg_set_select</a> (<a class="el" href="structfsg__search__s.html">fsg_set_t</a> *fsgs, const char *name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Switch to a new FSG (identified by its string name). <a href="#afbd05e7638e6a947fb056cc46dfb8fcb"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Public functions for FSG decoding. </p> <p>Definition in file <a class="el" href="fsg__set_8h_source.html">fsg_set.h</a>.</p> </div><hr/><h2>Function Documentation</h2> <a class="anchor" id="a283d0bc1d33f1f6d961bdfbb7939b853"></a><!-- doxytag: member="fsg_set.h::fsg_set_add" ref="a283d0bc1d33f1f6d961bdfbb7939b853" args="(fsg_set_t *fsgs, char const *name, fsg_model_t *wfsg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">POCKETSPHINX_EXPORT fsg_model_t* fsg_set_add </td> <td>(</td> <td class="paramtype"><a class="el" href="structfsg__search__s.html">fsg_set_t</a> * </td> <td class="paramname"><em>fsgs</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char const * </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">fsg_model_t * </td> <td class="paramname"><em>wfsg</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Add the given FSG to the collection of FSGs known to this search object. </p> <p>The given fsg is simply added to the collection. It is not automatically made the currently active one.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>Name to associate with this FSG. If NULL, this will be taken from the FSG structure. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to the FSG associated with name, or NULL on failure. If this pointer is not equal to wfsg, then there was a name conflict, and wfsg was not added. </dd></dl> <p>Definition at line <a class="el" href="fsg__search_8c_source.html#l00379">379</a> of file <a class="el" href="fsg__search_8c_source.html">fsg_search.c</a>.</p> <p>References <a class="el" href="fsg__search_8c_source.html#l00379">fsg_set_add()</a>, and <a class="el" href="fsg__search__internal_8h_source.html#l00073">fsg_search_s::fsgs</a>.</p> <p>Referenced by <a class="el" href="fsg__search_8c_source.html#l00379">fsg_set_add()</a>.</p> </div> </div> <a class="anchor" id="a91e2b8cba4e0ba30478260c18a36ed26"></a><!-- doxytag: member="fsg_set.h::fsg_set_get_fsg" ref="a91e2b8cba4e0ba30478260c18a36ed26" args="(fsg_set_t *fsgs, char const *name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">POCKETSPHINX_EXPORT fsg_model_t* fsg_set_get_fsg </td> <td>(</td> <td class="paramtype"><a class="el" href="structfsg__search__s.html">fsg_set_t</a> * </td> <td class="paramname"><em>fsgs</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char const * </td> <td class="paramname"><em>name</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Lookup the FSG associated with the given name. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>The FSG associated with name, or NULL if no match found. </dd></dl> <p>Definition at line <a class="el" href="fsg__search_8c_source.html#l00369">369</a> of file <a class="el" href="fsg__search_8c_source.html">fsg_search.c</a>.</p> <p>References <a class="el" href="fsg__search_8c_source.html#l00369">fsg_set_get_fsg()</a>, and <a class="el" href="fsg__search__internal_8h_source.html#l00073">fsg_search_s::fsgs</a>.</p> <p>Referenced by <a class="el" href="fsg__search_8c_source.html#l00369">fsg_set_get_fsg()</a>, and <a class="el" href="fsg__search_8c_source.html#l00453">fsg_set_select()</a>.</p> </div> </div> <a class="anchor" id="afbd05e7638e6a947fb056cc46dfb8fcb"></a><!-- doxytag: member="fsg_set.h::fsg_set_select" ref="afbd05e7638e6a947fb056cc46dfb8fcb" args="(fsg_set_t *fsgs, const char *name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">POCKETSPHINX_EXPORT fsg_model_t* fsg_set_select </td> <td>(</td> <td class="paramtype"><a class="el" href="structfsg__search__s.html">fsg_set_t</a> * </td> <td class="paramname"><em>fsgs</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>name</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Switch to a new FSG (identified by its string name). </p> <dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to new FSG, or NULL on failure. </dd></dl> <p>Definition at line <a class="el" href="fsg__search_8c_source.html#l00453">453</a> of file <a class="el" href="fsg__search_8c_source.html">fsg_search.c</a>.</p> <p>References <a class="el" href="fsg__search__internal_8h_source.html#l00074">fsg_search_s::fsg</a>, <a class="el" href="fsg__search_8c_source.html#l00369">fsg_set_get_fsg()</a>, and <a class="el" href="fsg__search_8c_source.html#l00453">fsg_set_select()</a>.</p> <p>Referenced by <a class="el" href="fsg__search_8c_source.html#l00453">fsg_set_select()</a>.</p> </div> </div> </div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="fsg__set_8h.html">fsg_set.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>