使用 geograpy3 获取国家名称的错误结果
Getting wrong results for country names using geograpy3
我尝试了 运行 geograpy3 自述文件中给出的示例代码。但是,我得到这样的答案。有什么办法吗?
您的问题提出了与 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)
我尝试了 运行 geograpy3 自述文件中给出的示例代码。但是,我得到这样的答案。有什么办法吗?
您的问题提出了与 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)