Is there a way for Rasa to recognize cities in a text without needing to create the custom entity “city” and list all the possible cities?
Listing all possible cities is infeasible. You can add training data for this custom entity “city” to your NLU training data(take a look at Entity Extraction) and use a entity extractor like Components (CRFEntityExtractor)
I wasn’t thinking about a look-up table with all the cities in the world listed; I thought more of a component for doing language analysis and recognizing the category of the word (Geographical entity, Person, Organization…) based on the sentence. Something like what the Python library NLTK already does…
You could build a custom component which uses the NLTK NER model and include it in your NLU pipeline.
Is there any guide on how to build a custom component?
Yes, here you go - Enhancing Rasa NLU models with Custom Components
Ok, thank you