It seems that geograpy calls the node method of the nltk Tree object:
nes = nltk.ne_chunk(nltk.pos_tag(text)) for ne in nes: if len(ne) == 1: if (ne.node == 'GPE' or ne.node == 'PERSON') and ne[0][1] == 'NNP':
which package nltk marked obsolete:
def _get_node(self): """Outdated method to access the node value; use the label() method instead.""" raise NotImplementedError("Use label() to access a node label.") def _set_node(self, value): """Outdated method to set the node value; use the set_label() method instead.""" raise NotImplementedError("Use set_label() method to set a node label.") node = property(_get_node, _set_node)
The package is broken. You can fix it yourself or use another.
Patrick collins
source share