# Help with Rasa for Hebrew

**URL:** https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924
**Category:** Rasa Open Source
**Created:** [January 12, 2021, 2:15pm UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924 "2021-01-12T14:15:50Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![nailon](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nailon](https://forum.rasa.com/u/nailon)
#### Post date: [January 12, 2021, 2:15pm UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/1 "2021-01-12T14:15:50Z")

</div>

Hello all, Does anyone by any chance have any experience with Rasa for Hebrew? Thanks 🙂Nir

---

<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: [January 14, 2021, 8:49am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/2 "2021-01-14T08:49:04Z")

</div>

Hi Nir,

I’m can’t say that I know of any examples but I have been working on tools for Rasa compatible tools for Non-English. Here’s a small list of tools/topics with regards to machine learning:

- Correct me if I am wrong, but I think Hebrew text can be split into tokens by a whitespace tokenizer? If so, the standard pipeline that we give you via `rasa init` will already work for you.
- I maintain a library called [rasa-nlu-examples](https://rasahq.github.io/rasa-nlu-examples/) that tries to support many Non-English tools. For example, it supports [FastText](https://fasttext.cc/docs/en/crawl-vectors.html) and [Byte-Pair Embeddings](https://nlp.h-its.org/bpemb/he/), both offer pre-trained embeddings for Hebrew.
- There are multi-language BERT embeddings that are supported via our [LanguageModelFeaturizer](https://rasa.com/docs/rasa/components/#languagemodelfeaturizer). In particular, we got good feedback on [LaBSE](https://huggingface.co/sentence-transformers/LaBSE). I’m not aware of any deployment for Hebrew, but it’s a tool that might help.

Having mentioned these tools though, I would like to stress that the most important part of an assistant is the data, not the pipeline. I might focus on getting something demo-able first so that you can start collecting feedback from users. I do not speak Hebrew, but I can imagine that DIET and some simple CountVectors will go a long way when you’re starting out.

If there are more specific issues that you’re concerned with, let me know! I’m working on educational material this quarter on Non-English and if there are any specific blockers for you I’d love to understand that some more. I’m also interested in hearing if there are tools that I should add to Rasa-NLU-Examples for Hebrew.

---

<div class="post-metadata">

### Author: ![nailon](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nailon](https://forum.rasa.com/u/nailon)
#### Post date: [January 14, 2021, 9:08am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/3 "2021-01-14T09:08:40Z")

</div>

Dear Vincent,

Thank you so much for the detailed response. I will definitely look into FastText, Byte-Pair Embeddings and the other resources you mention.

Nir

---

<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: [January 15, 2021, 6:42am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/4 "2021-01-15T06:42:57Z")

</div>

If you’re interested in playing around with these embeddings, you might enjoy playing around with [whatlies](https://rasahq.github.io/whatlies/). It’s a tool I made to explore pre-trained embeddings from a Jupyter notebook. There’s an example [here](https://rasahq.github.io/whatlies/examples/arabic/) with Arabic benchmarks and a youtube video [here](https://www.youtube.com/watch?v=YsMoGd7sYMQ&t=215s&ab_channel=Rasa) where it is used for bulk labelling (which might help if you’re getting started).

---

<div class="post-metadata">

### Author: ![nailon](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nailon](https://forum.rasa.com/u/nailon)
#### Post date: [January 15, 2021, 9:10am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/5 "2021-01-15T09:10:40Z")

</div>

Dear Vincent, Thank you so much for all your help. So far I have been able, using your guidance, to use the FastText embeddings (using your wonderful experimental library). I will definitely also check out whatlies later, it’s hard to keep up with all your great advice!

Trouble is that I am currently stuck with using rasa x in local mode. (I have no problem with Rasa in command line mode). The problems I have are very inconsistent and random. When I click on “train” I get an error 50% of the time, while it works fine the remaining 50%. When I try to converse with the bot, I also get problems around 50% of the time. I think the problem is related to the rasa server connectivity, but I have been unable to identify what the problem is, even when running with --debug. I will be happy if you can help me or route this to someone who can, here are the basic env details:

Rasa Version : 2.2.2 Rasa SDK Version : 2.2.0 Rasa X Version : 0.34.0 Python Version : 3.8.0 Operating System : Linux-5.4.0-60-generic-x86\_64-with-glibc2.27 Python Path : /home/nailon/rasa\_x\_test/venv/bin/python3.8

---

<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: [January 15, 2021, 9:26am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/6 "2021-01-15T09:26:55Z")

</div>

Could you share your config.yml file? Also maybe a traceback of any errors/training messages? Are you able to run `rasa train` from the command line to see if that works?

---

<div class="post-metadata">

### Author: ![nailon](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nailon](https://forum.rasa.com/u/nailon)
#### Post date: [January 15, 2021, 9:30am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/7 "2021-01-15T09:30:01Z")

</div>

rasa train works fine. Never had a problem there. Here is config.yml

```auto
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/

# https://rasahq.github.io/rasa-nlu-examples/docs/featurizer/fasttext/
language: he

pipeline:
   - name: WhitespaceTokenizer
   - name: CountVectorsFeaturizer
     analyzer: char_wb
     min_ngram: 1
     max_ngram: 4
   - name: rasa_nlu_examples.featurizers.dense.FastTextFeaturizer
     cache_dir: vecs
     file: cc.he.300.bin    
   - name: DIETClassifier
     epochs: 100
   - name: EntitySynonymMapper
   - name: ResponseSelector
     epochs: 100
   - name: FallbackClassifier
     threshold: 0.3
     ambiguity_threshold: 0.1

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
# # No configuration for policies was provided. The following default policies were used to train your model.
# # If you'd like to customize them, uncomment and adjust the policies.
# # See https://rasa.com/docs/rasa/policies for more information.
# - name: MemoizationPolicy
# - name: TEDPolicy
# max_history: 5
# epochs: 100
# - name: RulePolicy

```

---

<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: [January 15, 2021, 9:33am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/8 "2021-01-15T09:33:27Z")

</div>

This is a strange suggestion, but could you try to change the language to `"en"`? Just want to confirm that that isn’t the issue. If the issue persists it might be best to start a new thread such that this thread remains on the topic of Hebrew. I can also ping colleagues who are working on Rasa X to have a look on this new thread.

One question, you’ve added a CountVectorizer that grabs subwords. Is there a reason why you didn’t add one for entire words?

---

<div class="post-metadata">

### Author: ![nailon](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nailon](https://forum.rasa.com/u/nailon)
#### Post date: [January 15, 2021, 9:37am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/9 "2021-01-15T09:37:23Z")

</div>

I will try switching to “en” and update .

Re countvectorizer, truth is I just copied from somewhere, I didn’t know I am grabbing subwords.

Nir

---

<div class="post-metadata">

### Author: ![nailon](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nailon](https://forum.rasa.com/u/nailon)
#### Post date: [January 15, 2021, 10:54am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/10 "2021-01-15T10:54:17Z")

</div>

I did a clean setup using python3.7, using the exact same configuration files and this time things have been working smoothly (so far…)

Note that earlier I used python3.8, and due to problems with installation, I had to downgrade the rasa version I used to 2.2.2, based on advice I saw in this forum. But python3.7 seemed to make all these problems disappear.

Are issues with python3.8 known, or is it just my experience?

---

<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: [January 15, 2021, 1:51pm UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/11 "2021-01-15T13:51:55Z")

</div>

I would need to check GitHub to know for sure. I’ve been working on python3.7 since I started working.

---

<div class="post-metadata">

### Author: ![nailon](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nailon](https://forum.rasa.com/u/nailon)
#### Post date: [January 17, 2021, 8:18pm UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/12 "2021-01-17T20:18:30Z")

</div>

Dear Vincent,

I started working with Rasa using docker, but I am quite new to docker and a bit confused as to how to include the required pip dependencies to rasa docker image.

More specifically, I would like to add the following python libraries (which worked nicely for me in local mode): pip install fasttext pip install git+https://github.com/RasaHQ/rasa-nlu-examples

Do I need to create a new rasa docker image for that, by extending the rasa/rasa docker image? Or is there a better way for that?

Thanks Nir

---

<div class="post-metadata">

### Author: ![nailon](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@nailon](https://forum.rasa.com/u/nailon)
#### Post date: [January 19, 2021, 7:49am UTC](https://forum.rasa.com/t/help-with-rasa-for-hebrew/38924/13 "2021-01-19T07:49:37Z")

</div>

Never mind, I figured it out, thanks
