Extract date and city not using text service

(SANG) #1

Hi all

I need to extract date and city from user response
example :
user said : can you help me booking hotel in singapore on 12 Feb 2017
by this case I will filter word
“booking hotel” as trigger flow

“singapore” filter as location /city, if location not empty on the user response
bot asking location will not running in the flow , if empty bot asking city or location to user

“12 Feb 2017” will be the date if date have been on the user response ( not empty )
bot asking date will not running in the flow , if empty bot asking date time

its make bot more like human , I know its can be done by text split
but its make me create more 5 - 6 step in the flow before bot decide yes or not asking date n location

if only there is param or variable like attribute we can define on user response on bot receive message
its will great :slight_smile:

(John Jackson) #2

Really what you need here is some NLP (natural language processing) that can extract the entities (city and date).

You could use a service such as API.AI, which is now free since Google bought them. What you need to do is receive your message, then send the request to API.AI using our Webhook and HTTP service, and then in the response you should have both a city and date if you’re trained API.AI properly.

Hope this helps :smiley:

(SANG) #3

Thanks John

I guest I must learn API.ai first to doing this , anyway thanks for the advice
looks like flow xo will be top of all bot platform :smile:

thanks