1

Is it possible to define two different pipelines and decide which one to use at inference time? (and different models, too) To keep it simple think to an English-Italian MoodBot. Firstly you detect the language used by the user and based on the result you use the Italian pipeline or the English one. I'd need this because different languages could require different NLU pipelines. I hope it's clear what I mean. Thanks!

Gianluca
  • 63
  • 3

1 Answers1

1

Well, you've basically answered your question yourself. You need to add to your application some module that will detect the language given a user's text. There are lots of open-source tools that can do that for you. Try searching through GitHub. For example, this repository popped up as the first link when I googled "language detection".

maya-ami
  • 380
  • 2
  • 7
  • 1
    thank you so much for your reply, but this basically doesn't answer to my question. I know the general idea, for the language identification task I'd use a pre-trained model from Facebook. But I don't know in practice how to put things together. I'm sorry if I can't explain it better than this. – Gianluca Jan 11 '22 at 12:46
  • @Gianluca okay, I see what you mean. Would you be able to update your original post with more technical information? Maybe a block diagram of your system as it is now? What exactly isn't clear about "how to put things together"? To my understanding, you get a string from your user in your app, you feed this string to your language identification model (LMI), then depending on the answer of LMI, you trigger the appropriate NLU pipeline for that language. – maya-ami Jan 12 '22 at 10:36
  • @Gianluca if your question is not conceptual, i.e. "how to design the system?", but rather "I have an idea but have no code/no desire to write code for this, can someone do this for me?", then stackoverflow is hardly the place you'll get much help. It'll be faster and easier to hire a software engineer to do it for you. Hope that helps! Cheers! – maya-ami Jan 12 '22 at 10:46
  • Sorry, probably my bad. I'm definitely not the "I have no desire to write code" kind of developer. Maybe I should have been more specific, my question is about how to implement this logic in Rasa (I'm learning it at the moment). The added tag alone is not enough. Cheers – Gianluca Jan 13 '22 at 20:26