pyjsgf
pyjsgf copied to clipboard
Why is an error reported when punctuation marks appear in the file and how to solve it
<Punctuation> = ( ',' | '.' | '。' | ',')
when i set the grammar_file like that ,why error: ite-packages/pyparsing.py", line 3846, in parseImpl raise ParseException(instring, loc, self.errmsg, self) pyparsing.ParseException: Expected end of text, found '<' (at char 319), (line:11, col:1)
@iiot-tbb have you solved this punctuation problem?
@iiot-tbb have you solved this punctuation problem?
no, I just filter out punctuation
@iiot-tbb how to set the grammar_file?pls let me know,3q
Hello @iiot-tbb,
Thank you for opening this issue. My apologies for taking quite some time to reply. The pyjsgf parser does not presently support punctuation marks as (or in) tokens. I had overlooked section 2.3 of the JSGF specification which says this is perfectly valid. This problem will be fixed in the next version.
Relatedly, quoted tokens are also unsupported. I'll fix this too.