49 #include <sphinxbase/fsg_model.h> 50 #include <sphinxbase/hash_table.h> 51 #include <sphinxbase/jsgf.h> 54 #include <pocketsphinx_export.h> Implementation of FSG search (and "FSG set") structure.
POCKETSPHINX_EXPORT fsg_model_t * fsg_set_select(fsg_set_t *fsgs, const char *name)
Switch to a new FSG (identified by its string name).
POCKETSPHINX_EXPORT fsg_set_iter_t * fsg_set_iter_next(fsg_set_iter_t *itor)
Advance an iterator to the next grammar in the set.
hash_iter_t fsg_set_iter_t
Iterator over finite-state grammars.
POCKETSPHINX_EXPORT fsg_model_t * fsg_set_remove(fsg_set_t *fsgs, fsg_model_t *wfsg)
Delete the given FSG from the known collection.
POCKETSPHINX_EXPORT fsg_model_t * fsg_set_add(fsg_set_t *fsgs, char const *name, fsg_model_t *wfsg)
Add the given FSG to the collection of FSGs known to this search object.
hash_table_t * fsgs
Table of all FSGs loaded.
POCKETSPHINX_EXPORT fsg_set_iter_t * fsg_set_iter(fsg_set_t *fsgs)
Get an iterator over all finite-state grammars in a set.
POCKETSPHINX_EXPORT fsg_model_t * fsg_set_remove_byname(fsg_set_t *fsgs, char const *name)
Like fsg_set_del_fsg(), but identifies the FSG by its name.
POCKETSPHINX_EXPORT fsg_model_t * fsg_set_iter_fsg(fsg_set_iter_t *itor)
Get the current rule in an FSG iterator.
POCKETSPHINX_EXPORT fsg_model_t * fsg_set_get_fsg(fsg_set_t *fsgs, char const *name)
Lookup the FSG associated with the given name.
POCKETSPHINX_EXPORT void fsg_set_iter_free(fsg_set_iter_t *itor)
Free an FSG iterator (if the end hasn't been reached).