dialogflow-esnlu

Extract/map geo-country entity if geo-city is provided


I am currently using the System entity @sys.geo-country in the utterances to extract the country name.

Is there a way to extract or map the @sys.geo-city entity to @sys.geo-country?

Example usecase: I want to travel to Amsterdam - Extract the @sys.geo-city and find the corresponding country and process the request


Solution

  • No there is no out of the box solution for this in Dialogflow. The only thing entities do is extract words from the user input and save them in parameters in the request, there is no way for Dialogflow to map this to a different entity or value.

    Your best option would be to take your Bot Framework bot and look at the incoming requests from Dialogflow, extract the entity and do the look-up of which country @sys-geo-city is in, yourself through code.