Weather Bot with Multi-language Option

Hi Friend,

I am newbie in RASA, I have created a weatherbot and its working as expected. This is a English speaking bot. Can any one explain how to integrate one more language(Portuguese) to this bot.

I have shared the files related to this project. bot_stories.md (2.6 KB) data.json (9.2 KB) nlu_model_config.md (269 Bytes) weather_domain.yml (463 Bytes)

Thanks in Advance, EB

Hi EB,

using the spacy pipeline you have to train different bots for different languages since spacy is using the language model for one specific language. The tensorflow embedded pipeline could probably handle multiple languages, but I would not recommend that.

Hi Tobias,

We (dialogue.co, @moaazsidat ) are also thinking about supporting users with different language preferences. When a user starts the chat, we have a user profile that includes the user’s language preference.

This is especially important when the bot needs to initiate the chat by sending the very first greeting message in the language of the user’s preference.

It makes sense to have a language-specific rasa_nlu process/endpoint that loads a model trained on a specific language.

My understanding is, rasa_core runs the channel connector in-process. Whenever it receives the message, it sends the message to rasa_nlu without doing any pre-processing. So there’s no way to route the message coming from a channel into a rasa_nlu endpoint based on message metadata.

In Can Rasa_core connect multiple Rasa_nlu · Issue #379 · RasaHQ/rasa_core · GitHub @amn41 mentions subclassing the Interpreter class, creating something like a MetaRasaNLUInterpreter. To use this approach, one would also need to extend UserMessage to allow channels to pass message metadata (such as language preference or another metadata that could help the interpreter to determine which NLU model to use).

Thanks, Alexis

I’ve put together some thoughts of how Rasa could be enhanced to support multi-language use-cases in a more flexible way: Dynamic configuration of NLU endpoint (Tracker Aware Interpreter) · Issue #1764 · RasaHQ/rasa_core · GitHub and can propose a PR for it, if the solution makes sense.

@amn41 and team, would love your feedback.

1 Like