divvun / libdivvun

lib for running gramcheck and other pipelines + cli; modules for CG→spelling, CG→feedback, tagging blanks
https://giellalt.github.io/proof/gramcheck/GrammarCheckerDocumentation.html
GNU General Public License v3.0
9 stars 1 forks source link

Speller suggestions removed by divvun-checker #22

Closed snomos closed 5 years ago

snomos commented 5 years ago

Compare this:

$ echo De lea jearaldat goabbá orrru eanemus jierpmálaš | ./grammarcheckers/modes/trace-smegram8-gc.mode | divvun-suggest -j -g grammarcheckers/generator-gramcheck-gt-norm.hfstol -m grammarcheckers/errors.xml | jq .
{
  "errs": [
    [
      "orrru",
      24,
      29,
      "typo",
      "Ii leat sátnelisttus",
      [
        "orro",
        "orru"
      ],
      "Čállinmeattáhusat"
    ]
  ],
  "text": "De lea jearaldat goabbá orrru eanemus jierpmálaš\n"
}

with this:

$ echo De lea jearaldat goabbá orrru eanemus jierpmálaš | divvun-checker -a grammarcheckers/se.zcheck | jq .
{
  "errs": [
    [
      "orrru",
      24,
      29,
      "typo",
      "Ii leat sátnelisttus",
      [],
      "Čállinmeattáhusat"
    ]
  ],
  "text": "De lea jearaldat goabbá orrru eanemus jierpmálaš"
}

The speller suggestions have disappeared from the last one.

$ divvun-checker -V
divvun-checker - Divvun gramcheck version 0.3.2
unhammer commented 5 years ago

try divvun-checker -n smegram -a grammarcheckers/se.zcheck

The first one listed in pipespec.xml is used as default in case of no -n.

snomos commented 5 years ago

Will @default-pipe have the same effect as moving a pipeline first in pipespec.xml?

snomos commented 5 years ago

Will @default-pipe have the same effect as moving a pipeline first in pipespec.xml?

Yes, it has, and with that change (or by reordering the pipelines in pipespec.xml) I now get:

$ echo De lea jearaldat goabbá orrru eanemus jierpmálaš | divvun-checker -a grammarcheckers/se.zcheck | jq .
{
  "errs": [
    [
      "orrru",
      24,
      29,
      "typo",
      "Ii leat sátnelisttus",
      [
        "orru"
      ],
      "Čállinmeattáhusat"
    ]
  ],
  "text": "De lea jearaldat goabbá orrru eanemus jierpmálaš"
}

which is exactly what we want.

unhammer commented 5 years ago

Will @default-pipe have the same effect as moving a pipeline first in pipespec.xml?

It should, e.g. <pipespec default-pipe="smegram" …