How to Implement Multiple Languages
You follow the same process to create a dataset and model that supports a specific language, but you pass in different parameters.
There are two new API parameters that enable multilanguage support:
You use the
language parameter when you create a dataset. The text in the dataset source file (.csv, .tsv, or .json) should be in one of the supported languages. Then, when you make the API call to create the dataset, pass in the
language parameter that contains the value of one of the supported languages. If you don’t pass the parameter, the dataset language defaults to English (en_US).
Multilanguage support is currently available only for Einstein Intent datasets and models.
Multilanguage support is currently available only for Einstein Intent datasets and models." }
After you create the dataset, you use the
algorithm parameter when you train a dataset to create a model. This optional parameter specifies the algorithm used to train the dataset. Valid values are:
intent—Uses the original training algorithm. The training process defaults to this algorithm if the
algorithmparameter isn’t supplied.
multilingual-intent—Uses the training algorithm that supports multiple languages. A model created using this algorithm returns one of the model labels, even if the text sent for prediction doesn’t fall into any of the labels.
multilingual-intent-ood—Uses the training algorithm that supports multiple languages and handles out-of-domain text. A model created using this algorithm returns an empty
probabilitiesarray when text sent for prediction doesn’t fall into one of the labels.
Even if your dataset language is English, we recommend that you use either the
multilingual-intent-ood algorithm for better results.