pocketsphinx icon indicating copy to clipboard operation
pocketsphinx copied to clipboard

Added jsgf/fsg tags extraction

Open CarloBenussi opened this issue 7 years ago • 5 comments

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).

CarloBenussi avatar Jul 18 '17 16:07 CarloBenussi

Thank you, did you read https://github.com/cmusphinx/pocketsphinx/issues/13 ?

nshmyrev avatar Jul 18 '17 18:07 nshmyrev

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

CarloBenussi avatar Jul 18 '17 18:07 CarloBenussi

Ok, I'll leave it open for now

nshmyrev avatar Jul 24 '17 14:07 nshmyrev

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.

KiAlexander avatar Jul 05 '19 07:07 KiAlexander

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...

dhdaines avatar Jul 22 '22 21:07 dhdaines