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

fix caps when moving words #77

Closed unhammer closed 2 months ago

unhammer commented 2 months ago

$ echo Uunnaaviup sanianiittoq igalaaq qiverseriarlugu uunnaavik qamissallugu, eqqarsaammerujussuarpunga | hfst-tokenize -g /usr/share/giella/kal/tokeniser-disamb-gt-desc.pmhfst |vislcg3 -g /usr/share/giella/kal/disambiguator.bin |vislcg3 -g /usr/share/giella/kal/functions.bin | vislcg3 -g spellchecker.cg3 | vislcg3  -g grammarchecker.cg3 | divvun-suggest -g /usr/share/giella/kal/generator-gt-desc.hfstol |__ap_colour
divvun-suggest WARNING: no errors.xml argument; tags used as error messages.
divvun-suggest: WARNING: No <description> for "syn-abs-wordorder" in any xml:lang
"<igalaaq>"
        "igalaaq" N Abs Sg <W:0.0> @N< co&syn-abs-wordorder ID:9
        "igalaaq" N Abs Sg <W:0.0> @N< co&syn-abs-wordorder &ADDED ID:9
"<Uunnaaviup>"
        "uunnaavik" N Rel Sg <W:0.0> @POSS>
:
"<sanianiittoq>"
        "sani" N Lok Sg 3SgPoss Gram/Hyb IP Gram/IV TUQ Der/vn N Abs Sg <W:0.0> @OBJ>
:
"<igalaaq>"             Uunnaaviup sanianiittoq igalaaq →  igalaaq Uunnaaviup sanianiittoq
        "igalaaq" N Abs Sg <W:0.0> @N< DELETE &syn-abs-wordorder ID:3 R:$3:9 R:LEFT:9
syn-abs-wordorder
:
"<qiverseriarlugu>"
        "qiver" Gram/IV TIP Der/vv Gram/TV RIAR Der/vv Gram/TV V Cont 3SgO <W:0.0> @ADVL>
:
"<uunnaavik>"
        "uunnaavik" N Abs Sg <W:0.0> @OBJ>
:
"<qamissallugu>"
        "qamip" Gram/TV SSA Der/vv V Cont 3SgO <W:0.0> @CL-CIT>
"<,>"
        "," CLB <W:0.0>
:
"<eqqarsaammerujussuarpunga>"
        "eqqarsar" Gram/IV UMMIR Der/vv RUJUP Der/vv SUAR Der/vv Gram/IV V Ind 1Sg <W:0.0> @PRED
:\n

should be Igalaaq uunnaaviup sanianiittoq


Input to divvun-suggest:

"<igalaaq>"
    "igalaaq" N Abs Sg <W:0.0> @N< co&syn-abs-wordorder ID:9
    "igalaaq" N Abs Sg <W:0.0> @N< co&syn-abs-wordorder &ADDED ID:9
"<Uunnaaviup>"
    "uunnaavik" N Rel Sg <W:0.0> @POSS>
: 
"<igalaaq>"
    "igalaaq" N Abs Sg <W:0.0> @N< DELETE &syn-abs-wordorder ID:3 R:$3:9 R:LEFT:9
: 
"<sanianiittoq>"
    "sani" N Lok Sg 3SgPoss Gram/Hyb IP Gram/IV TUQ Der/vn N Abs Sg <W:0.0> @OBJ> &syn-TUQ-wordorder
: 
"<qiverseriarlugu>"
    "qiver" Gram/IV TIP Der/vv Gram/TV RIAR Der/vv Gram/TV V Cont 3SgO <W:0.0> @ADVL>
: 
"<uunnaavik>"
    "uunnaavik" N Abs Sg <W:0.0> @OBJ>
: 
"<qamissallugu>"
    "qamip" Gram/TV SSA Der/vv V Cont 3SgO <W:0.0> @CL-CIT>
"<,>"
    "," CLB <W:0.0>
: 
"<eqqarsaammerujussuarpunga>"
    "eqqarsar" Gram/IV UMMIR Der/vv RUJUP Der/vv SUAR Der/vv Gram/IV V Ind 1Sg <W:0.0> @PRED
:\n
unhammer commented 2 months ago

now get

"<igalaaq>"
        "igalaaq" N Abs Sg <W:0.0> @N< co&syn-abs-wordorder ID:9
        "igalaaq" N Abs Sg <W:0.0> @N< co&syn-abs-wordorder &ADDED ID:9
"<Uunnaaviup>"
        "uunnaavik" N Rel Sg <W:0.0> @POSS>
:
"<igalaaq>"             Uunnaaviup igalaaq      →  Igalaaq uunnaaviup
        "igalaaq" N Abs Sg <W:0.0> @N< DELETE &syn-abs-wordorder ID:3 R:$3:9 R:LEFT:9
syn-abs-wordorder
:
"<sanianiittoq>"                sanianiittoq
        "sani" N Lok Sg 3SgPoss Gram/Hyb IP Gram/IV TUQ Der/vn N Abs Sg <W:0.0> @OBJ> &syn-TUQ-wordorder
syn-TUQ-wordorder
:
"<qiverseriarlugu>"
        "qiver" Gram/IV TIP Der/vv Gram/TV RIAR Der/vv Gram/TV V Cont 3SgO <W:0.0> @ADVL>
:
"<uunnaavik>"
        "uunnaavik" N Abs Sg <W:0.0> @OBJ>
:
"<qamissallugu>"
        "qamip" Gram/TV SSA Der/vv V Cont 3SgO <W:0.0> @CL-CIT>
"<,>"
        "," CLB <W:0.0>
:
"<eqqarsaammerujussuarpunga>"
        "eqqarsar" Gram/IV UMMIR Der/vv RUJUP Der/vv SUAR Der/vv Gram/IV V Ind 1Sg <W:0.0> @PRED
:\n