我尝试运行geograpy3自述文件中给出的示例代码。但是,我得到这样的答案。可以做些什么呢?
问问题
182 次
1 回答
1
您的问题引发了与https://github.com/somnathrakshit/geograpy3/issues/3类似的问题
现在有一个 get_geoPlace_context 函数,它将搜索限制为 NLTK 的 GPE 标签,因此忽略 PERSON 和 ORGANIZATION 条目,因为原始函数 get_place_context 会这样做:
def testGetGeoPlace(self):
'''
test geo place handling
'''
url='http://www.bbc.com/news/world-europe-26919928'
places=geograpy.get_geoPlace_context(url=url)
if self.debug:
print(places)
self.assertEqual(['Moscow', 'Donetsk', 'Brussels', 'Kharkiv', 'Russia'],places.cities)
于 2020-09-11T07:33:29.200 回答