Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to decompound "Kinderzahnheilkunde" #28

Open
cycore opened this issue Apr 8, 2016 · 0 comments
Open

Failure to decompound "Kinderzahnheilkunde" #28

cycore opened this issue Apr 8, 2016 · 0 comments

Comments

@cycore
Copy link

cycore commented Apr 8, 2016

The plugin fails to decompound the German word "Kinderzahnheilkunde". The resulting tokens are ["kinderzahnheilkunde", "kinderzahnhe", "ilkunde"]. The expected tokes are ["kinderzahnheilkunde", "kinder", "zahn", "heil", "kunde"].

I'm using plugin Version 2.2.0.0 and elasticsearch 2.2.0.

Index settings are

{
        "analysis": {
            "filter": {
                "german_stop": {
                    "type": "stop",
                    "stopwords": "_german_"
                },
                "german_stemmer": {
                    "type": "stemmer",
                    "language": "light_german"
                },
                "german_decompound": {
                    "type": "decompound"
                }
            },
            "analyzer": {
                "german_with_decompounder": {
                    "tokenizer": "standard",
                    "filter": [
                            "lowercase",
                            "german_decompound",
                            "unique",
                            "german_stop",
                            "german_normalization",
                            "german_stemmer"
                    ]
                }
            }
        }
    }

I got the results from the _analyze API with the explain=true option.

{
    "detail": {
        "custom_analyzer": true,
        "charfilters": [
        ],
        "tokenizer": {
            "name": "standard",
            "tokens": [
                {
                    "token": "Kinderzahnheilkunde",
                    "start_offset": 0,
                    "end_offset": 19,
                    "type": "<ALPHANUM>",
                    "position": 0,
                    "bytes": "[4b 69 6e 64 65 72 7a 61 68 6e 68 65 69 6c 6b 75 6e 64 65]",
                    "positionLength": 1
                }
            ]
        },
        "tokenfilters": [
            {
                "name": "lowercase",
                "tokens": [
                    {
                        "token": "kinderzahnheilkunde",
                        "start_offset": 0,
                        "end_offset": 19,
                        "type": "<ALPHANUM>",
                        "position": 0,
                        "bytes": "[6b 69 6e 64 65 72 7a 61 68 6e 68 65 69 6c 6b 75 6e 64 65]",
                        "positionLength": 1
                    }
                ]
            },
            {
                "name": "german_decompound",
                "tokens": [
                    {
                        "token": "kinderzahnheilkunde",
                        "start_offset": 0,
                        "end_offset": 19,
                        "type": "<ALPHANUM>",
                        "position": 0,
                        "bytes": "[6b 69 6e 64 65 72 7a 61 68 6e 68 65 69 6c 6b 75 6e 64 65]",
                        "keyword": false,
                        "positionLength": 1
                    },
                    {
                        "token": "kinderzahnhe",
                        "start_offset": 0,
                        "end_offset": 19,
                        "type": "<ALPHANUM>",
                        "position": 0,
                        "bytes": "[6b 69 6e 64 65 72 7a 61 68 6e 68 65]",
                        "keyword": false,
                        "positionLength": 1
                    },
                    {
                        "token": "ilkunde",
                        "start_offset": 0,
                        "end_offset": 19,
                        "type": "<ALPHANUM>",
                        "position": 0,
                        "bytes": "[69 6c 6b 75 6e 64 65]",
                        "keyword": false,
                        "positionLength": 1
                    }
                ]
            },

Any suggestions to receive better results are well appreciated. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant