Minor issue + suggestion (grammar.py)

32 views
Skip to first unread message

Marcus Karr

unread,
Nov 1, 2019, 9:12:30 PM11/1/19
to nltk-dev
Hi all, I just joined the group and hope this is the appropriate venue for reporting a small issue.

I have found a problem in trying to call PCFG.fromstring() on string representations of productions taken from the Penn Treebank.  Some productions have the form . -> '.' or , -> ',' which causes a ValueError to be raised from standard_nonterm_parser().  Perhaps the pattern in _STANDARD_NONTERM_RE could be extended to cover single-character punctuation marks like the comma and period, since these are sometimes used as nonterminals.
Reply all
Reply to author
Forward
0 new messages