Language

Definition

Bots are multilingual, meaning that you can speak several languages with the same bot. We currently support all languages with different levels of functionality: Advanced, standard, and basic.

Advanced level

Intent classification Custom entities Gold entities Sentiment analysis Enrichment,
type, act
Language detection
English
French
Spanish
German

Standard level

Intent classification Custom entities Gold entities Sentiment analysis Enrichment, type, act Language detection
Arabic
Catalan
Danish
Finnish
Hindi
Italian
Japanese
Korean
Norwegian
Dutch
Polish
Portuguese
Russian
Swedish
Chinese

Basic level

Intent classification Custom entities Gold entities Sentiment analysis Enrichment, type, act Language detection
All other languages

To enable users to speak different languages with your bot, add the desired languages for each intent on the Train tab and create expressions in those languages. (For advanced level languages, remember that SAP Conversational AI suggests additional expressions for each expression you add, so you can add expressions quickly and easily to an intent.)

SAP Conversational AI automatically detects the input language. For advanced and standard level languages, this lets you adapt your answers.

After the language has been detected, the following rules apply:

  • If you have expressions in that language, it is used for processing.
  • If you don’t have any expressions in that language, your default bot language is used for processing.

Tips

  • If you use a single language, pass your language as a request parameter to avoid the language detection step when you want to analyze text or use the Bot Builder API.
  • Consider using a translation service when you start constructing an intent in a new language. It’ll make the operation faster.
  • Don’t forget to set up all your intents in the new language.

Example of how the language is detected

You have intents in French and English, but none in Spanish, and your bot’s default language is French.

  • You receive a user utterance that we detect as Spanish: We use French as the processing language because your bot doesn’t handle Spanish, and return a JSON containing fr in the processing_language field, and es in the language field.
  • You send us a user utterance telling us it’s English: We use English as the processing language and return a JSON containing en in the processing_language field and en in the language field.
  • You receive a user utterance that we detect as French: We use French as the processing language and return a JSON containing fr in the processing_language field and fr in the language field.
  • You send us a user utterance telling us it’s Spanish: We use French as the processing language because your bot doesn’t handle Spanish, and return a JSON containing fr in the processing_language field and es in the language field.

How the language is handled in a conversation

In the Bot Builder, the first sentence sent in a new conversation is analyzed by the natural language processing (NLP) API and the language is detected. We set the conversation_language to the processing_language detected.

All subsequent messages are processed with the conversation_language that was detected in the first sentence of the conversation. This is to avoid changing the language when processing ambiguous international expressions like OK, Cool, and so on.

If you want to change the conversation_language, you can use a Change language action.