French langauge trained Bot picking up random intents for some utterences


I have a bot which should work on french language only, But my bot sometimes picks random intent’s when typed something in English also . This should not be happening . I have gone through the language support doc and my nlu config is this -

language: “fr”


  • name: “tokenizer_whitespace”
  • name: “intent_entity_featurizer_regex”
  • name: “ner_crf”
  • name: “ner_synonyms”
  • name: “intent_featurizer_count_vectors”
  • name: “intent_classifier_tensorflow_embedding” intent_tokenization_flag: true intent_split_symbol: “+”

depends on the word… there are some common words in french and english, it is normal for it predict something even it is written in english

no the words of english on which my french bot is mapping an intent has totally different syntax in french

can you give an example

like i have an intent in my french language bot for outlook. I have utterances in french only . when i type “can you tell me how can i log into outlook?” intent for outlook is getting picked up

what was your training data for your intent?

comment je peux se connecter dans outlook? 
Je veux connecter dans Outlook?

yes similar to these types only

bot is not only accepting english phrases but also picking up other languages and for some phrases it is picking up right intents meaning they are mapping correct intents like when i type

"can you tell me how can i log into outlook?” it picks outlook intent when i type same phrase in spanish it picks outlook intent and for some phrases in different language lets say in arabic intents are getting wrongly picked

but it is normal, it will not reject another language because embeddings dont have a notion of languages in particular. it will predict even if you put garbage in it.

what is your expectation? to send the user another message?

no it is not all the time picking up right intent in that case sometimes it picks randomly a wrong intent also.

In case of a bot in french language i want my bot to reply when someone queries in English or any other language

{ “query”: “order a pizza”, “topScoringIntent”: { “intent”: null, “score”: 0 }, “intents”: [ { “intent”: null, “score”: 0 } ], “entities”: }

If you want the French words to be OOV so null is introduced, you have to add a OOV words for a range of French words

Like i said, most French words are similar

You can also try a language disambiguation logic to detect the language in the pipeline as wel

is their any blog post or any implemented solution for this?

You can use something like this

but for ambigious texts, short text, it will not work.

It is upto your channel tbh to handle the disambiguation based on your intro text. It would be strange for a user to type in english when the welcome text is in french. you can maybe help the user is you use language detect, just add a class implementation of lang_detect and write it in your config pipeline

Hello @NikhilBansal21, I’m trying to detect foreign languages and reply accordingly, an answer like “Sorry, I don’t speak Korean” for example. Did you manage to do it ?