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

Cyclical suggestion #51

Open
Kristober opened this issue Aug 17, 2022 · 0 comments
Open

Cyclical suggestion #51

Kristober opened this issue Aug 17, 2022 · 0 comments

Comments

@Kristober
Copy link

I have a open issue in Yfirlestur but it's probably more appropriate for GreynirCorrect, creating here for visability.
Issue in Yfirlestur

If we take the text Hann vil for example. GreynirCorrect will give two suggestion, the latter one being the same as the original input. What appears to be happening is that the latter suggestion is based on the input being the first suggestion, instead of being based off the original input Hann vil.
As a consequence I get this cyclical suggestion: Hann vil -> Hann vill -> Hann vil... There is no resolution for the word vil / vill

Response given by Yfirlestur for text Hann vil

{
    "result": [
        [
            {
                "annotations": [
                    {
                        "code": "P_wrong_person",
                        "detail": null,
                        "end": 1,
                        "end_char": 7,
                        "references": [],
                        "start": 0,
                        "start_char": 0,
                        "suggest": "Hann vill",
                        "suggestlist": null,
                        "text": "Orðasambandið 'Hann vil' var leiðrétt í 'Hann vill'"
                    },
                    {
                        "code": "BEYGVILLA",
                        "detail": "Beygingarmyndin 'vill' er ekki í samræmi við málvenju, 'vil' er ákjósanlegra.",
                        "end": 1,
                        "end_char": 7,
                        "references": [],
                        "start": 1,
                        "start_char": 4,
                        "suggest": "vil",
                        "suggestlist": null,
                        "text": "Beygingarvilla: 'vill' -> 'vil'"
                    }
                ],
                "corrected": "Hann vil",
                "nonce": "41903140",
                "original": "Hann vil",
                "token": "458f66a39f679f710e313e3d1e456e0971abd7405453b32543e47048d4351b2d",
                "tokens": [
                    {
                        "i": 0,
                        "k": 6,
                        "o": "Hann",
                        "x": "Hann"
                    },
                    {
                        "i": 4,
                        "k": 6,
                        "o": " vil",
                        "x": "vil"
                    }
                ]
            }
        ]
    ],
    "stats": {
        "ambiguity": 1.0,
        "num_chars": 8,
        "num_parsed": 1,
        "num_sentences": 1,
        "num_tokens": 2
    },
    "text": "Hann vil",
    "valid": true
}

If I use the first suggestion Hann vill and call this service again with my new string Hann vill I will get this suggestion (basically the latter suggestion again).

Response given by Yfirlestur for text Hann vill

{
    "result": [
        [
            {
                "annotations": [
                    {
                        "code": "BEYGVILLA",
                        "detail": "Beygingarmyndin 'vill' er ekki í samræmi við málvenju, 'vil' er ákjósanlegra.",
                        "end": 1,
                        "end_char": 8,
                        "references": [],
                        "start": 1,
                        "start_char": 4,
                        "suggest": "vil",
                        "suggestlist": null,
                        "text": "Beygingarvilla: 'vill' -> 'vil'"
                    }
                ],
                "corrected": "Hann vil",
                "nonce": "28078813",
                "original": "Hann vill",
                "token": "8d2b53caad5b029b1064172be9ca776a6c0b7b539af3e6b668973c937433ea7c",
                "tokens": [
                    {
                        "i": 0,
                        "k": 6,
                        "o": "Hann",
                        "x": "Hann"
                    },
                    {
                        "i": 4,
                        "k": 6,
                        "o": " vill",
                        "x": "vil"
                    }
                ]
            }
        ]
    ],
    "stats": {
        "ambiguity": 1.0,
        "num_chars": 9,
        "num_parsed": 1,
        "num_sentences": 1,
        "num_tokens": 2
    },
    "text": "Hann vill",
    "valid": true
}
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