Language Recognition with Flow Builder

Language recognition capabilities in FlowBuilder allow you to personalize and improve the experience of your customers. So, let's get to the details on how to use it.

Table of Content

Before Getting Started

Setting up Language Recognition

Let's say we would like to reply with a different SMS content, depending on the language of the incoming message to us.

This is the way to do it:

1. After the initial incoming SMS message trigger, place a Branch step:

2. In the Branch step, select New Branch by Message Content:

3. Select the condition if the incoming message is in language and choose the language:

You can add as many branches as you need. Just make sure you set the condition for each:

4. Based on the language, you are now able to add the desired response and choose how the Flow should continue:

Language detection accuracy

For those who want to know more, here's a bit of explanation on how Language recognition works and what is the accuracy percentage. The language detection service is a machine learning model. This means that the service uses a big set of examples for a task to learn how to make predictions for that task.

The dataset used to train the model is imperfect and will always lack some combinations of words or characters of a certain language.

The model that is used in the language service is tested on a dataset containing 64000 Tweets. For this dataset, the percentage of correctly classified languages for the Tweets is 89%. However, this does not mean that this is the actual accuracy of the model since we do not know what data an end-user of yours might send.

The model runs on the MessageBird servers alone. Your data is safe; it will never be sent to any third parties.

Some scenarios where the model is known to have difficulty predicting the correct language with high certainty:

  1. With very short text, mainly single words. Because single words are likely to occur in multiple languages, the model has difficulty correctly predicting these.

  2. Languages that are very similar. For instance, Spanish and Portuguese are fairly similar. For some sentences which are very alike in the two languages, the model might have difficulty predicting the correct one.

  3. Text containing irregular characters (or irregular combinations). This is mainly when a user tries to trick the system. This could be sending a single emoji, on which language detection is fairly arbitrary because it does not contain any language clues. Also using characters that look alike but are different. An example of this is the “regular space” and “Japanese space”. Both these spaces look the same, but the model will have difficulty predicting the language when the Japanese space is used consistently in an English text.

Related Articles

📤 Feel free to contact our Support in case you might need some help!

Last updated