我想从作者的隶属关系中提取国家/地区名称。 例如,我有以下文本:
affiliation = "1Key Laboratory of Marine Drugs, Ministry of Education, School of Medicine and Pharmacy, Ocean University of China, Qingdao 266003, PR China."
我使用了以下代码:
import geograpy
places = geograpy.get_place_context(text = affiliation)
print(places.countries)
结果如下:
['China', 'United States', 'Russian Federation']
显然,“美国”和“俄罗斯联邦”是误报。我该如何自动消除它们?