divvun / divvun-gramcheck-web

Grammar checker for web word processors, targeted at minority and indigenous languages, but open for everyone.
GNU General Public License v3.0
1 stars 0 forks source link

Context, highlight wrong for typo found as substring #52

Closed snomos closed 9 months ago

snomos commented 2 years ago

Input text:

Su váldofágadutkamuš lei sosiálapedagogihkas, fáddán ”Samisk barneoppdragelse og kjønnssosialisering”, Oslo 1986.

The Norwegian quote is of course not recognised, and reported as errors. BUT the third Norw. word, og, is also found as a substring in the Sámi word sosiálapedagogihkas, and both the context and the highlight hits this point, instead of the correct part of the input:

Skjermbilde 2022-01-26 kl  11 36 09

Inspecting the data being transferred, it seems the indices are correct:

Skjermbilde 2022-01-26 kl  11 39 50

Running the text through the command line grammar checker returns the same indices as in the network data:

echo 'Su váldofágadutkamuš lei sosiálapedagogihkas, fáddán ”Samisk barneoppdragelse og kjønnssosialisering”, Oslo 1986.' \
| divvun-checker -a se.zcheck | jq .
{
  "errs": [
    [
      "Samisk",
      54,
      60,
      "typo",
      "Ii leat sátnelisttus",
      [],
      "Čállinmeattáhus"
    ],
    [
      "barneoppdragelse",
      61,
      77,
      "typo",
      "Ii leat sátnelisttus",
      [],
      "Čállinmeattáhus"
    ],
    [
      "og",
      78,
      80,
      "typo",
      "Ii leat sátnelisttus",
      [
        "on",
        "ok",
        "ogi",
        "oge",
        "uš",
        "ja",
        "go",
        "kg",
        "ii",
        "oč"
      ],
      "Čállinmeattáhus"
    ],
    [
      "kjønnssosialisering",
      81,
      100,
      "typo",
      "Ii leat sátnelisttus",
      [],
      "Čállinmeattáhus"
    ]
  ],
  "text": "Su váldofágadutkamuš lei sosiálapedagogihkas, fáddán ”Samisk barneoppdragelse og kjønnssosialisering”, Oslo 1986."
}

That is, it seems to be an error in the extension. It also appears in both MS Word and GDocs.

Tested with Chrome 97.0.4692.99 (Offisiell delversjon) (x86_64).

snomos commented 1 year ago

Here is a new example from SMJ: https://github.com/giellalt/lang-smj/issues/27

snomos commented 10 months ago

A likely duplicate: https://github.com/divvun/divvun-gramcheck-web/issues/18

snomos commented 9 months ago

Fixed in GDocs, only deployment missing in Word.

snomos commented 9 months ago

Now also fixed in Word.