I have a chatbot which is built in Microsoft bot framework with Node.js and I integrated this bot with a NLP framework called LUIS.AI intelligence to handle the user conversation based upnon their intents and entity. Here I need this bot to support multiple languages in the single LUIS application but it does not allow us to do so. Is there any hacky method to support multiple languages in a single LUIS application or in code level.?
Asked
Active
Viewed 646 times
3
-
Mixing languages within the same conversation(/document), or sentence (e.g. Spanglish, Taglish)? Is it unambiguously known which parts are language A vs language B? – smci Mar 02 '21 at 20:04
1 Answers
2
Code Level: You can create multiple LUIS applications and plug them into your LuisRecognizer using an ILuisModelMap. The keys are going to be your locales.
// Assuming you've already instantiated your bot, time to instantiate
// the LuisRecognizer with an ILuisModelMap.
var many_language_recognizer = new builder.LuisRecognizer({
'en': englishModel || process.env.EN_LUIS,
'es': spanishModel || process.env.ES_LUIS,
'fr': frenchModel || process.env.FR_LUIS
});
bot.recognizer(many_language_recognizer);
You'll also want to use the SDK's localization capabilities to generate your prompts and messages.
LUIS Level: LUIS only supports one language per application, hence having to create more than one app.

Steven G.
- 1,632
- 1
- 11
- 14
-
Thanks for your response. so the only way is creating multiple application in LUIS to support the multi lingual apps.? is there any other option to have a single application(english) on our side and translating the bot response and user response for the multi lingal purpose? – Vishnu Prabhakaran Sep 18 '17 at 12:03
-
1Sure thing! You could use the [Translator Text API](https://azure.microsoft.com/en-us/services/cognitive-services/translator-text-api/) to translate all incoming messages before they're sent to LUIS. In this case you'll want to use middleware to handle the translation before your LUIS Recognizer is called. You can also use middleware to translate your bot's response so you don't have to use additional localization inside of your bot. – Steven G. Sep 18 '17 at 16:53
-
-