pyStatParser icon indicating copy to clipboard operation
pyStatParser copied to clipboard

Error running the example in README

Open hongkedavid opened this issue 7 years ago • 4 comments

Hi, I cloned the master branch and tried the example in README, but encountered the following error. Could anyone know how to fix it? Thanks!

Python 2.7.12 (default, Jul 18 2016, 15:02:52) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from stat_parser import Parser parser = Parser() print parser.parse("How can the net amount of entropy of the universe be massively decreased?") Traceback (most recent call last): File "", line 1, in File "stat_parser/parser.py", line 112, in nltk_parse return nltk_tree(self.raw_parse(sentence)) File "stat_parser/parser.py", line 107, in raw_parse tree = self.norm_parse(sentence) File "stat_parser/parser.py", line 104, in norm_parse return CKY(self.pcfg, norm_words) File "stat_parser/parser.py", line 74, in CKY _, top = max([(pi[1, n, X], bp[1, n, X]) for X in pcfg.N]) ValueError: max() arg is an empty sequence

hongkedavid avatar Aug 30 '18 19:08 hongkedavid

I would like to follow up on this. I am having the same problem.

PartsUnknown avatar Sep 28 '18 01:09 PartsUnknown

Same here

ghost avatar Feb 18 '19 18:02 ghost

me too! anyone have a solution?

annaRichImperial avatar Jun 28 '19 14:06 annaRichImperial

I am having the same problem. It looks like a long shot but did anybody find a solution?

theadorabledev avatar Jan 04 '20 21:01 theadorabledev