# NLU customization for Arabic language

**URL:** <https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372>\
**Category:** Rasa Open Source\
**Created:** [November 21, 2021, 8:02am UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372 "2021-11-21T08:02:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pain](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pain/32/17279_2.png) [@Pain](https://forum.rasa.com/u/Pain)\
**Post date:** [November 21, 2021, 8:02am UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/1 "2021-11-21T08:02:43Z")

</div>

Hi everyone,

I am working on NLU customized pipeline for Arabic language. I am trying to test different components and test the performance based on them.

Do you have any advice to be sure that I am working on the right direction all the way? Any suggestions for projects that have used transformers( like bert) on the pipeline for non-English language?

Any other suggestion will be helpful for me.

@koaning

---

<div class="post-metadata">

**Author:** ![earroyoh](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/earroyoh/32/14447_2.png) [@earroyoh](https://forum.rasa.com/u/earroyoh)\
**Post date:** [November 21, 2021, 6:08pm UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/2 "2021-11-21T18:08:06Z")

</div>

SpacyNLP doesn’t seem to have an arabic language model yet, but you can try [fastText vectors arabic language models](https://github.com/facebookresearch/fastText/blob/master/docs/crawl-vectors.md) as explained in [rasa language support documentation](https://rasa.com/docs/rasa/language-support/).

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [November 22, 2021, 9:38am UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/3 "2021-11-22T09:38:34Z")

</div>

Hi all.

Just to check @Pain have you seen [my blogpost on Non-English tools in Rasa](https://rasa.com/blog/non-english-tools-for-rasa/)?

---

<div class="post-metadata">

**Author:** ![Pain](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pain/32/17279_2.png) [@Pain](https://forum.rasa.com/u/Pain)\
**Post date:** [November 23, 2021, 8:48am UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/5 "2021-11-23T08:48:04Z")

</div>

Yes, I have seen it before. It is really helpful.

But, I am looking for suggestions for pipelines that used Arabic language to see the components on it. So, I will have the full understanding where to put the transformer model in the pipeline and I will know what to use with it from available components.

---

<div class="post-metadata">

**Author:** ![koaning](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/koaning/32/6626_2.png) [@koaning](https://forum.rasa.com/u/koaning)\
**Post date:** [November 24, 2021, 10:08am UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/6 "2021-11-24T10:08:59Z")

</div>

Technically, this contains the `LaBSE` model with is multi-lingual and should contain some notion of Arabic.

```auto
pipeline:
- name: WhitespaceTokenizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
  analyzer: char_wb
  min_ngram: 1
  max_ngram: 4
- name: LanguageModelFeaturizer
  model_name: bert
  model_weights: rasa/LaBSE
- name: DIETClassifier
epochs: 100

```

Is that what you mean?

---

<div class="post-metadata">

**Author:** ![Pain](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pain/32/17279_2.png) [@Pain](https://forum.rasa.com/u/Pain)\
**Post date:** [November 24, 2021, 11:20am UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/7 "2021-11-24T11:20:33Z")

</div>

Yes, I mean like this. I have tried the following combination, but I think there is an error when using `asafaya/bert-base-arabic`.

```auto
version: "2.0"
language: ar
pipeline:
  - name: WhitespaceTokenizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: char_wb
    min_ngram: 1
    max_ngram: 4
  - name: LanguageModelFeaturizer
    model_name: "bert"
    model_weights: "rasa/LaBSE"
  - name: DIETClassifier
    epochs: 200
  - name: FallbackClassifier
    threshold: 0.7
  - name: DucklingEntityExtractor
    url: http://localhost:8000
    dimensions:
    - time
    - number
  - name: EntitySynonymMapper

```

I put the problem on another post, I did that before your reply and maybe it is a different question. In case you want to check, here it is: [Problem when using transformer in NLU pipeline](http://forum.rasa.com/t/problem-when-using-transformer-in-nlu-pipeline/49475)

---

<div class="post-metadata">

**Author:** ![Rasha\_Kyl](https://avatars.discourse-cdn.com/v4/letter/r/958977/32.png) [@Rasha\_Kyl](https://forum.rasa.com/u/Rasha_Kyl)\
**Post date:** [August 28, 2022, 8:32am UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/8 "2022-08-28T08:32:25Z")

</div>

Hi Pain Can you please support some help and tell us what Arabic pipeline did you find the best to use finally thanks

---

<div class="post-metadata">

**Author:** ![Abdo\_Kamr](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abdo_kamr/32/18338_2.png) [@Abdo\_Kamr](https://forum.rasa.com/u/Abdo_Kamr)\
**Post date:** [November 20, 2022, 1:52pm UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/9 "2022-11-20T13:52:40Z")

</div>

Hello @Pain, I sow the comments, how things going till now. I faced the same issue.

---

<div class="post-metadata">

**Author:** ![waleedtarazi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/waleedtarazi/32/21989_2.png) [@waleedtarazi](https://forum.rasa.com/u/waleedtarazi)\
**Post date:** [May 2, 2023, 11:16am UTC](https://forum.rasa.com/t/nlu-customization-for-arabic-language/49372/10 "2023-05-02T11:16:24Z")

</div>

Hey Abdo, have you made it through your issue? I’m now developing an Arabic chatbot and I guess I need your advice about that I really appreciate any help you can provide.
