When a user converses with travel bot for booking his/her journey(maybe flight/train/bus), the bot identifies source and destination precisely if user query mentions source location as former and destination location as latter.
But,for instance,if user enters query Book me a flight from Chennai to Bangalore. Here, bot identifies the locations accurately. Chennai is identified as source location since the location occurs first in user query and Bangalore is identified as the destination since it is the second location entity in the query.
But, if a user enters a query “Book me a flight to Bangalore from Chennai.”It fails to identify the right source and destination since bot considers the first occurrence of location as source and interprets Bangalore as source location, instead of “destination” and Chennai as the destination location instead of “source”.
The above concern can be handled by building a custom model. The model has to be trained with sample documents to identify the right source and destination locations using Watson Knowledge Studio(WKS) which can then be deployed to Natural Language Understanding(NLU) and integrated with chatbot using Watson Assistant & IBM Cloud Functions. Read detailed solution for this problem statement here->https://github.com/IBMDevConnect/travel-identify-source-destination