Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i make multi language rasa chatbot having at least two languages?

i want to make a rasa based chatbot with at least two languages or multi lingual chatbot. Can anybody tell me possible way of making it.

like image 378
Raghav Sharma Avatar asked Sep 20 '19 12:09

Raghav Sharma


1 Answers

Nice question. (And this is something I'm working on too.)

The good thing about the embedding intent classifier is that it doesn't have any assumptions about what language it works on. So, in theory, it should work with every language.

There are 2 approaches that you can use to support multi-language intents.
1. make separate intents for them (e.g. hello_en, hello_xx, for hello spoken in 2 languages)
2. create a language detector and handle them all in custom action

If you're using default utter_ methods, method 1 may make more sense becuase you can just use hello_en as intent name and utter_hello_en to get back the response.
Method 2 makes more sense when you actually have multiple variables that you want to use to generate your response (and of course, you handle them in custom actions).

All in all, you can implement multi-language chatbots in rasa!

Edit:
What you want is a custom language detector that finds out which language you're using. You can include the language-detector as a custom component in the beginning of your pipeline and make it fill a language slot. Then, you can use this slot value as input in your custom actions and respond accordingly.

like image 79
lahsuk Avatar answered Jan 02 '23 20:01

lahsuk