pyjsgf icon indicating copy to clipboard operation
pyjsgf copied to clipboard

Why is an error reported when punctuation marks appear in the file and how to solve it

Open iiot-tbb opened this issue 3 years ago • 4 comments

            <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 avatar Jun 07 '21 08:06 iiot-tbb

@iiot-tbb have you solved this punctuation problem?

keezen avatar Jun 28 '21 10:06 keezen

@iiot-tbb have you solved this punctuation problem?

no, I just filter out punctuation

iiot-tbb avatar Jun 28 '21 11:06 iiot-tbb

@iiot-tbb how to set the grammar_file?pls let me know,3q

iris-qq avatar Sep 24 '21 02:09 iris-qq

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.

drmfinlay avatar Jan 04 '23 10:01 drmfinlay