Hello I am trying to build a bot that will do flight searches based on origin and destination. We will leave dates out of this for simplicity.
For the search API, I need to map user input to IATA codes (3 letter uppercase codes) ex: BUH - Bucharest, JFK - John F. Kennedy International Airport
Currently I have 2 questions:
- How can I efficiently map airport names and cities to these IATA codes? I have tried to use synonyms but they are working for me only for exact matches. For instance, “Kennedy Airport” will not be matched as “JFK” but “John F. Kennedy International Airport” will.
- Currently I have a form that asks user for origin and destination airport. For this purpose I created 2 entities (from_iata, to_iata). The problem is that NLU has hard time figuring out which is from_iata and which is to_iata because they both describe airports. What is a good solution to this?