Does Microsoft chatbot(Node.js) support multiple l

2019-07-12 23:04发布

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.?

1条回答
Anthone
2楼-- · 2019-07-12 23:14

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.

查看更多
登录 后发表回答