A simple library to match locations in text using SpaCy
pip install nlmatcher
import nlmatcher
matcher = nlmatcher.LocationMatcher()
text = "I live in Amsterdam and work in Utrecht"
matches = matcher.match(text)
for match in matches:
print(match.text)
Amsterdam
Utrecht