# Kuromoji: Tokenization of ゴロンと is Unexpected (incorrect?)

**URL:** <https://discuss.elastic.co/t/kuromoji-tokenization-of-is-unexpected-incorrect/119585>\
**Category:** Elasticsearch\
**Created:** [February 13, 2018, 7:02am UTC](https://discuss.elastic.co/t/kuromoji-tokenization-of-is-unexpected-incorrect/119585 "2018-02-13T07:02:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HajimeOwari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hajimeowari/32/27672_2.png) [@HajimeOwari](https://discuss.elastic.co/u/HajimeOwari)\
**Post date:** [February 13, 2018, 7:02am UTC](https://discuss.elastic.co/t/kuromoji-tokenization-of-is-unexpected-incorrect/119585/1 "2018-02-13T07:02:11Z")

</div>

Is the below a bug or expected behavior for Kuromoji? The behavior occurs on default settings and even on the [Kuromoji demo page.](https://www.atilika.com/en/kuromoji/)

Kuromjiでは下記はバグか想定通りかを確認いただけますでしょうか。デフォルト設定でも[Kuromojiのデモページ](https://www.atilika.com/ja/kuromoji/)でも下記の通りになります。

Using Kuromoji as configured below.

```
				"ja_tokenizer":{
				"type":"kuromoji_tokenizer",
				"mode":"search",
				"discard_punctuation": "false"
				}

```

Tokenization for ゴロンと is:

```
{
"tokens": [
    {
        "token": "ゴロ",
        "start_offset": 0,
        "end_offset": 2,
        "type": "word",
        "position": 0
    },
    {
        "token": "ン",
        "start_offset": 2,
        "end_offset": 3,
        "type": "word",
        "position": 1
    },
    {
        "token": "と",
        "start_offset": 3,
        "end_offset": 4,
        "type": "word",
        "position": 2
    }
]

```

}

Expected is:

```
{
"tokens": [
    {
        "token": "ゴロン",
        "start_offset": 0,
        "end_offset": 3,
        "type": "word",
        "position": 0
    },
    {
        "token": "と",
        "start_offset": 3,
        "end_offset": 4,
        "type": "word",
        "position": 1
    }
]

```

}

---

<div class="post-metadata">

**Author:** ![johtani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johtani/32/44956_2.png) [@johtani](https://discuss.elastic.co/u/johtani)\
**Post date:** [February 13, 2018, 7:43am UTC](https://discuss.elastic.co/t/kuromoji-tokenization-of-is-unexpected-incorrect/119585/2 "2018-02-13T07:43:51Z")

</div>

That is an expected behavior. I think it depends the dictionary.

In search use-case, you can use nbest feature in [kuromoji\_tokenizer](https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-kuromoji-tokenizer.html) or user\_dictionary.

---

<div class="post-metadata">

**Author:** ![HajimeOwari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hajimeowari/32/27672_2.png) [@HajimeOwari](https://discuss.elastic.co/u/HajimeOwari)\
**Post date:** [February 20, 2018, 1:47pm UTC](https://discuss.elastic.co/t/kuromoji-tokenization-of-is-unexpected-incorrect/119585/3 "2018-02-20T13:47:20Z")

</div>

Many thanks for the quick reply. We're using Neologd. I'm not seeing that specific entry in the dictionary. Will consider nbest and other options then. Thank you!

---

<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:** [March 20, 2018, 1:48pm UTC](https://discuss.elastic.co/t/kuromoji-tokenization-of-is-unexpected-incorrect/119585/4 "2018-03-20T13:48:07Z")

</div>

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