PocketSphinx
0.6
|
Public functions for FSG decoding. More...
#include <sphinxbase/fsg_model.h>
#include <sphinxbase/hash_table.h>
#include <sphinxbase/jsgf.h>
#include <pocketsphinx_export.h>
Go to the source code of this file.
Typedefs | |
typedef struct fsg_search_s | fsg_set_t |
Set of finite-state grammars used in decoding. | |
typedef hash_iter_t | fsg_set_iter_t |
Iterator over finite-state grammars. | |
Functions | |
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_set_iter_t * | fsg_set_iter_next (fsg_set_iter_t *itor) |
Advance an iterator to the next grammar in the set. | |
POCKETSPHINX_EXPORT fsg_model_t * | fsg_set_iter_fsg (fsg_set_iter_t *itor) |
Get the current rule in an FSG iterator. | |
POCKETSPHINX_EXPORT void | fsg_set_iter_free (fsg_set_iter_t *itor) |
Free an FSG iterator (if the end hasn't been reached). | |
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 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. | |
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_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_select (fsg_set_t *fsgs, const char *name) |
Switch to a new FSG (identified by its string name). |
Public functions for FSG decoding.
Definition in file fsg_set.h.
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.
The given fsg is simply added to the collection. It is not automatically made the currently active one.
name | Name to associate with this FSG. If NULL, this will be taken from the FSG structure. |
Definition at line 379 of file fsg_search.c.
References fsg_set_add(), and fsg_search_s::fsgs.
Referenced by fsg_set_add().
POCKETSPHINX_EXPORT fsg_model_t* fsg_set_get_fsg | ( | fsg_set_t * | fsgs, |
char const * | name | ||
) |
Lookup the FSG associated with the given name.
Definition at line 369 of file fsg_search.c.
References fsg_set_get_fsg(), and fsg_search_s::fsgs.
Referenced by fsg_set_get_fsg(), and fsg_set_select().
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).
Definition at line 453 of file fsg_search.c.
References fsg_search_s::fsg, fsg_set_get_fsg(), and fsg_set_select().
Referenced by fsg_set_select().