pocketsphinx
pocketsphinx copied to clipboard
Added jsgf/fsg tags extraction
Together with the pull request on sphinxbase, with this update it would be possible to extract tags from jsgf grammars. Two functions on pocketsphinx.h/c were added, one to get the result not just as a simple const char* hyp, but as a complex glist_t (ps_get_hyp_with_tags), which would then be accessed through the other function on pocketsphinx (ps_get_word_and_tags).
Thank you, did you read https://github.com/cmusphinx/pocketsphinx/issues/13 ?
Hi, I read it, actually I was using regular expressions too before implementing this. But I needed to have a direct link between words in hyp and tags, in order to extract easily parameters from the recognized phrase. I hope this could be of some help. By now I just implemented a quick way (and not that elegant let's say) to access tags defined in a jsgf grammar by {} expression; in the future I will probably improve this part on my forked project, if you decide not to merge. Thanks
Ok, I'll leave it open for now
when I type "make clean all", I encounter the following error “../../src/libpocketsphinx/.libs/libpocketsphinx.so: undefined reference to `fsg_link_tag' ” sphinxbase is also downloaded from github.
Hi! This is a good idea, the tags never were completely implemented.
The discussion in #13 is interesting. Commercial ASR aplications have been moving away (slowly) from grammar-based recognition for the last decade or so, because combining LVCSR using a language model (or perhaps some horrific end-to-end blob of Derp Learning) with a robust parser is generally more, well, robust, and also more accurate.
All this is true under the assumption that recognition is Done In The Cloud on some constantly expanding farm of servers. It's less obvious for the sort of environments and applications for which PocketSphinx was originally designed.
Unfortunately this PR doesn't quite work with the current layout of the codebase :) if you have the time to update it I would appreciate that...