Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running the example in README #12

Open
hongkedavid opened this issue Aug 30, 2018 · 4 comments
Open

Error running the example in README #12

hongkedavid opened this issue Aug 30, 2018 · 4 comments

Comments

@hongkedavid
Copy link

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

@PartsUnknown
Copy link

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

@ghost
Copy link

ghost commented Feb 18, 2019

Same here

@annaRichImperial
Copy link

me too! anyone have a solution?

@theadorabledev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants