Sunday, December 18, 2011

Using nltk with Python 3 (10)

And on to chapter 10: Analyzing the Meaning of Sentences
Again, chart parsers are used here and they won't work for now (at least not as expected in the book). So let us skip over them, just for now, and start with the part about logic.
>>> g = nltk.Assignment(dom)
Traceback (most recent call last):
   File "...\lib\site-packages\nltk\sem\evaluate.py", line 220, in _addvariant
    for item in list(self.items()):
TypeError: 'list' object is not callable
Change line #220 in sem/evaluate.py to
for item in self.items():

And that's for chapter 10.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.