# Beider\_morse phonetic encoder silently fails when languageset not specified

**URL:** <https://discuss.elastic.co/t/beider-morse-phonetic-encoder-silently-fails-when-languageset-not-specified/101581>\
**Category:** Elasticsearch\
**Created:** [September 23, 2017, 7:43pm UTC](https://discuss.elastic.co/t/beider-morse-phonetic-encoder-silently-fails-when-languageset-not-specified/101581 "2017-09-23T19:43:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkazez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bkazez/32/25991_2.png) [@bkazez](https://discuss.elastic.co/u/bkazez)\
**Post date:** [September 23, 2017, 7:43pm UTC](https://discuss.elastic.co/t/beider-morse-phonetic-encoder-silently-fails-when-languageset-not-specified/101581/1 "2017-09-23T19:43:53Z")

</div>

Hi, I'm considering using ElasticSearch for a project and ran into an issue with beider\_morse phonetic encoding. I need Beider Morse language detection, so based on the docs at [https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-phonetic-token-filter.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-phonetic-token-filter.html) I used the following:

```
curl -XDELETE 'http://localhost:9200/phonetictest?pretty'
curl -XPUT 'http://localhost:9200/phonetictest?pretty' -d'{
  "settings": {
    "analysis": {
      "filter": {
        "beider_morse_filter": { 
          "type": "phonetic",
          "encoder": "beider_morse",
          "name_type": "generic"
        }
      },
      "analyzer": {
        "my_beider_morse": {
          "tokenizer": "standard",
          "filter": "beider_morse_filter" 
        }
      }
    }
  }
}'

curl -XGET 'http://localhost:9200/phonetictest/_analyze?pretty&analyzer=my_beider_morse' -d'ABADIAS'

```

Incorrectly returns:

```
{
  "tokens" : [
    {
      "token" : "ABADIAS",
      "start_offset" : 0,
      "end_offset" : 7,
      "type" : "<ALPHANUM>",
      "position" : 0
    }
  ]
}

```

Expected token list based on the current BMPM PHP code at [http://stevemorse.org/phoneticinfo.htm](http://stevemorse.org/phoneticinfo.htm) :

```
abadias abadia abadios abadio abodias abodia abodios abodio abYdias abYdios avadias avadios avodias avodios obadias obadia obadios obadio obodias obodia obodios obodio obYdias obYdios ovadias ovadios ovodias ovodios Ybadias Ybadios Ybodias Ybodios YbYdias YbYdios abadiaS abadioS abodiaS abodioS obadiaS obadioS obodiaS obodioS

```

Questions:

1. How can I encode with automatic Beider Morse language detection?
2. For verification before moving forward with the project, which version of BMPM is the implementation based on?

Thanks,  
Ben

P.S. The documentation at [https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-phonetic-token-filter.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-phonetic-token-filter.html) has a mistake. "Comomon" is not a possible languageset value. In addition, the corrected spelling "common" is not possible either.

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [September 25, 2017, 4:35pm UTC](https://discuss.elastic.co/t/beider-morse-phonetic-encoder-silently-fails-when-languageset-not-specified/101581/2 "2017-09-25T16:35:29Z")

</div>

Thanks for opening an issue in our github repo: [https://github.com/elastic/elasticsearch/issues/26771](https://github.com/elastic/elasticsearch/issues/26771) . We will certainly have a look at it.

---

<div class="post-metadata">

**Author:** ![bkazez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bkazez/32/25991_2.png) [@bkazez](https://discuss.elastic.co/u/bkazez)\
**Post date:** [September 26, 2017, 11:10pm UTC](https://discuss.elastic.co/t/beider-morse-phonetic-encoder-silently-fails-when-languageset-not-specified/101581/3 "2017-09-26T23:10:31Z")

</div>

Thanks. I'm surprised there would be such a fundamental bug with a major phonetic analyser and wonder if I am doing something wrong? Or if older versions exhibited this bug too? I'm surprised no one would have caught it, which is why I imagine it must be something wrong on my end.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 24, 2017, 11:10pm UTC](https://discuss.elastic.co/t/beider-morse-phonetic-encoder-silently-fails-when-languageset-not-specified/101581/4 "2017-10-24T23:10:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
