我使用Python 3(我也安装了Python 2),我想从短文本中提取国家或城市.例如,text = "I live in Spain"或text = "United States (New York), United Kingdom (London)".
各国答案:
我试图安装,geography但我无法运行pip install geography.我收到此错误:
收集地理位置找不到满足要求地理位置的版本(来自版本:)没有找到地理位置的匹配分布
它看起来geography只适用于Python 2.
我也有geopandas,但我不知道如何使用geopandas从文本中提取所需的信息.