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

yaml oppmerking fungerer ikke #72

Open ilm024 opened 6 months ago

ilm024 commented 6 months ago

Yaml er oppmerket slik:

  - "{Le}¥{Le gus} giella njálmálasj?"
  - "{Le}¥{Le gus} tæksta almma ja dågålasj? "

Resultat av echo "Le giella njálmálasj?" | tools/grammarcheckers/modes/trace-smjgram-dev.mode | less -R er:

"<Le>"          Le      →  Le gus
        "liehket" V <smj> <smj> IV Ind Prs Sg3 SentInit <W:0.0> SELECT:1547:liehket MAP:3491 SELECT:4222 SUBSTITUTE:4313 @+FMAINV SUBSTITUTE:4312 &syn-missing-gus ID:1 R:RIGHT:25 R:$2:25 ADD:2992:xsyn-missing-gus ADDCOHORT-AFTER:3003 ADDRELATION($2):3004
syn-missing-gus
;       "Le" N Prop Sem/Sur Attr <W:0.0> SELECT:1547:liehket
;       "Le" N Prop Sem/Sur Pl Nom <W:0.0> SELECT:1547:liehket
;       "Le" N Prop Sem/Sur Sg Gen <W:0.0> SELECT:1547:liehket
;       "Le" N Prop Sem/Sur Sg Nom <W:0.0> SELECT:1547:liehket
;       "liehket" V IV Ind Prs Pl3 SentInit <W:0.0> @+FMAINV SELECT:1547:liehket MAP:3491 SELECT:4222
;       "liehket" V IV Ind Prs Sg2 SentInit <W:0.0> @+FMAINV SELECT:1547:liehket MAP:3491 SELECT:4222
: 
"<gus>"
        "gus" Pcle Qst &ADDED &syn-missing-gus ID:25 ADDCOHORT-AFTER:3003
syn-missing-gus
"<giella>"
        "giella" N <smj> <smj> Sem/Lang_Tool-catch Sg Nom <W:0.0> SUBSTITUTE:4311 SUBSTITUTE:4310
: 
"<njálmálasj>"
        "njálmme" Ex/N Sem/Body Der/lasj A <smj> <smj> <AttrPred> Sg Nom <W:0.0> SUBSTITUTE:507 SELECT:2499 SUBSTITUTE:4310 SUBSTITUTE:4309
        "njálmálasj" A <smj> <smj> <AttrPred> Sg Nom <W:0.0> SUBSTITUTE:507 SELECT:2499 SUBSTITUTE:4310 SUBSTITUTE:4309
;       "njálmme" Ex/N Sem/Body Der/lasj A <AttrPred> Attr <W:0.0> SUBSTITUTE:507 SELECT:2499
;       "njálmálasj" A <AttrPred> Attr <W:0.0> SUBSTITUTE:507 SELECT:2499
"<?>"
        "?" CLB <W:0.0>

Likevel så failer yamltest:

uit-mac-219:lang-smj ilm024$ gtgramtool test -c yaml tools/grammarcheckers/tests/DEV-syn-missing-gus-FAIL.yaml 
----------
Test 1/26: Le giella njálmálasj?
----------
DEV-syn-missing-gus-FAIL.yaml
[ 1/26][FAIL fp2] : (, ()) => Le :[Le gus] (syn-missing-gus)
DEV-syn-missing-gus-FAIL.yaml
[ 1/26][FAIL fn2] Le:Le gus (, ()) => :[] ()
Test 1 - Passes: 0, Fails: 2, Total: 2

----------
Test 2/26: Le tæksta almma ja dågålasj? 
----------
DEV-syn-missing-gus-FAIL.yaml
[ 2/26][FAIL fp2] : (, ()) => Le :[Le gus] (syn-missing-gus)
DEV-syn-missing-gus-FAIL.yaml
[ 2/26][FAIL fn2] Le:Le gus (, ()) => :[] ()
Test 2 - Passes: 0, Fails: 2, Total: 2
albbas commented 6 months ago

Når man kjører setningen gjennom divvun-checker får men dette svaret: echo Le giella njálmálasj\?|divvun-checker -a smj.zcheck -n smjgram|jq .

{
  "errs": [
    [
      "Le ",
      0,
      3,
      "syn-missing-gus",
      "syn-missing-gus",
      [
        "Le gus"
      ],
      "syn-missing-gus"
    ]
  ],
  "text": "Le giella njálmálasj?"
}

Det ser ut som om divvun-checker merker mellomrommet etter le som om det hører til feilen.