# Language Recognition with Flow Builder

Language recognition capabilities in [FlowBuilder](https://dashboard.messagebird.com/en/flow-builder) 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 <a href="#id-01fxw7kxvq1t3r8zqvpjhwmb85" id="id-01fxw7kxvq1t3r8zqvpjhwmb85"></a>

* [Before Getting Started](#01FXW7KXVQ7EK9F6B7HNJ4GFCB)
* [Setting up Language Recognition](#01FXW7KXVQH1X2K1Z9RQ6PPDZD)
* [Language detection accuracy](#01FXW7KXVQCY7XH8NPCDKAAP6R)
* [Related Articles](#01FXW7KXVQXH7NMZNA9S8SN671)

### Before Getting Started <a href="#id-01fxw7kxvq7ek9f6b7hnj4gfcb" id="id-01fxw7kxvq7ek9f6b7hnj4gfcb"></a>

* You will need an existing [MessageBird account](https://dashboard.messagebird.com/en/user/index)&#x20;
* An [enabled channel](https://dashboard.messagebird.com/en/channels) for engaging with your customers

### Setting up Language Recognition <a href="#id-01fxw7kxvqh1x2k1z9rq6ppdzd" id="id-01fxw7kxvqh1x2k1z9rq6ppdzd"></a>

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:

&#x20;

<figure><img src="/files/9eIj3158vg7u3aBdfqx1" alt=""><figcaption></figcaption></figure>

&#x20;

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

&#x20;

<figure><img src="/files/7tkpcjr00EEjT1Bk3Sc3" alt=""><figcaption></figcaption></figure>

&#x20;

&#x20;

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

&#x20;

<figure><img src="/files/hEKOhmQALtimtVGQ8hPN" alt=""><figcaption></figcaption></figure>

&#x20;

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

&#x20;

<figure><img src="/files/OhSOmTXeJPqxsDCOCsKo" alt=""><figcaption></figcaption></figure>

&#x20;

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

&#x20;

<figure><img src="/files/7rICY79ApvhQp0nV7XP9" alt=""><figcaption></figcaption></figure>

### &#x20; <a href="#id-01fxw7rfk7s09tq28c6xr1nxze" id="id-01fxw7rfk7s09tq28c6xr1nxze"></a>

### Language detection accuracy <a href="#id-01fxw7kxvqcy7xh8npcdkaap6r" id="id-01fxw7kxvqcy7xh8npcdkaap6r"></a>

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.&#x20;

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.&#x20;

### &#x20; <a href="#id-01fxw7rfk7y9wspedz5ve863x4" id="id-01fxw7rfk7y9wspedz5ve863x4"></a>

### Related Articles <a href="#id-01fxw7kxvqxh7nmzna9s8sn671" id="id-01fxw7kxvqxh7nmzna9s8sn671"></a>

* [Language Recognition in Inbox](/connectivity-platform/set-up-inboxs-built-in-automations/language-recognition.md)
* [Supported Languages by MessageBird Natural Language Processing](/connectivity-platform/faq/supported-languages-by-messagebird-natural-language-processing.md)

&#x20;

📤 Feel free to [contact our Support](https://support.messagebird.com/hc/en-us/requests/new) in case you might need some help!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/connectivity-platform/how-to-guides/language-recognition-with-flow-builder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
