Closed brunobg closed 9 years ago
To resolve the following issue : ############################################################################ NLTK seems to have changed this: http://www.nltk.org/_modules/nltk/tree.html
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/geograpy/init.py", line 6, in get_place_context
e.find_entities()
File "/usr/local/lib/python2.7/dist-packages/geograpy/extraction.py", line 31, in find_entities
if (ne.node == 'GPE' or ne.node == 'PERSON') and ne[0][1] == 'NNP':
File "/usr/local/lib/python2.7/dist-packages/nltk/tree.py", line 198, in _get_node
raise NotImplementedError("Use label() to access a node label.")
NotImplementedError: Use label() to access a node label.
############################################################################
Update the extraction.py code to the following.
if (ne.label() == 'GPE' or ne.label() == 'PERSON') and ne[0][1] == 'NNP':
This hasn't been updated, right?. The issue was opened 8 months ago, it is intended to be fixed?
Hey guys, the issue messages got buried in my inbox. I don't have write access to this repo anymore now that I'm not at Ushahidi. @brianherbert can you merge these requests, give me write access to this repo, or just transfer ownership to me? (It's a standalone library I wrote while we were developing CrisisNET)
I ended up making a fork with several fixes, but it's not completely finished yet. https://github.com/Corollarium/geograpy2
Hey @brunobg @gati - I've merged in the pull request. @brunobg, you can send through the rest of your fixes when they're complete and i'll merge them in.
Thanks so much!
Sure, but it's almost a rewrite and it won't be backwards compatible. I've kept plain fixes in https://github.com/Corollarium/geograpy and that's the PR you already merged. Thanks!
NLTK seems to have changed this: http://www.nltk.org/_modules/nltk/tree.html