Closed koaning closed 3 years ago
Heyo! How would you approach this problem? Is there a particular feature of Rasa you have in mind?
Thanks :)
That's a really good question. For starters we'd need to have the data available for it. Something tells me that eventually something "knowledge-base"-like should be used here but since that part of the Rasa library is currently experimental a custom action might be best for now. This could be a nice use-case for entitiy groups but I'm not 100% sure.
Take this example from the documentation;
I want to fly from [Berlin]{"entity": "city", "role": "departure"}
to [San Francisco]{"entity": "city", "role": "destination"}.
In this flight example it makes 100% sense to add a role to the entity. The pokemon analogy might be something like;
Please translate [Snorlax](pokemon_name)
from [English]{"entity": "language", "role": "departure"}
to [French]{"entity": "language", "role": "destination"}
But I wonder if it's more natural for a user to ask.
What is the [English](language) name of [Ronflex](pokemon_name)?
What is the [French](language) name of [Snorlax](pokemon_name)?
The latter is something that we would need to fix with a custom python action and we'd need to check all the names in all the languages (this data needs to be added to our json). This can be quite involved but still feels relatively straightforward.
I'm open to ideas though. I should also admit that I may not know enough about pokemon translations. @EmmaWightman you might know more.
Your last example seems to be using the knowledge base approach. Is this your intention?
@juandes this is true, but you can also have a custom action handle the found entities/intents. The notation that I use there also applies for entities in general and these can also be picked up by custom actions.
The knowledge base approach in the long term seems like the end-goal but I know that the research team is still experimenting with that feature so I prefer not to learn on it too much for now.
You can find a custom action example that uses the found intents here. Something like this might work for the short term.
Feature Did you know that snorlax is called
ronflex
in France? Japanese names also tend to be different. It would be a nice feature if our system could also detect these names.Example
Example 1
Example 2