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

Correct casing of suggestions not working for Sámi letters #23

Closed snomos closed 5 years ago

snomos commented 5 years ago

Cf the following two screen shots:

Skjermbilde 2019-03-13 kl  19 21 31 Skjermbilde 2019-03-13 kl  19 21 53

That is, it works for initial letter I, but not for initial letter Č.

unhammer commented 5 years ago

Rart, har allereie ein test for uppercasing av ulbðmil som fungerte på mac i følgje travis.

Eg har lagt til ein som eksplisitt prøver titlecasing av č. Kan du prøva make check på nyaste libdivvun?

snomos commented 5 years ago

Mystisk - make check går gjennom utan problem:

Making check in src
make[1]: Nothing to be done for `check'.
Making check in test/suggest
/Applications/Xcode.app/Contents/Developer/usr/bin/make  generator.hfstol bil.hfstol
hfst-strings2fst -j -i generator.strings -o generator.hfst
hfst-fst2fst -O -i generator.hfst -o generator.hfstol
printf '0\t1\tj\to\n1\t2\ta\tg\n2\t3\t+CC\t@0@\n3' | hfst-txt2fst --format=optimized-lookup-weighted -o bil.hfstol
/Applications/Xcode.app/Contents/Developer/usr/bin/make  check-TESTS
PASS: run
SKIP: run-flushing
PASS: run-genall
PASS: validate
============================================================================
Testsuite summary for Divvun gramcheck 0.3.2
============================================================================
# TOTAL: 4
# PASS:  3
# SKIP:  1
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
Making check in test/blanktag
/Applications/Xcode.app/Contents/Developer/usr/bin/make  blanktagger.hfst
hfst-regexp2fst --disjunct -i blanktagger.xfst -o blanktagger.hfst.tmp
hfst-fst2fst -O -i blanktagger.hfst.tmp -o blanktagger.hfst
rm blanktagger.hfst.tmp
/Applications/Xcode.app/Contents/Developer/usr/bin/make  check-TESTS
PASS: run
============================================================================
Testsuite summary for Divvun gramcheck 0.3.2
============================================================================
# TOTAL: 1
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
Making check in test/cgspell
/Applications/Xcode.app/Contents/Developer/usr/bin/make  analyser.hfstol
hfst-lexc analyser.lexc -o analyser.invhfst
hfst-lexc: warning: Defaulting to OpenFst tropical type
Root...
hfst-invert -i analyser.invhfst -o analyser.hfst
hfst-fst2fst -w -i analyser.hfst -o analyser.hfstol
rm analyser.invhfst analyser.hfst
/Applications/Xcode.app/Contents/Developer/usr/bin/make  check-TESTS
PASS: run.default
PASS: run.X
PASS: run.n2
PASS: run.skip
PASS: run.flush
============================================================================
Testsuite summary for Divvun gramcheck 0.3.2
============================================================================
# TOTAL: 5
# PASS:  5
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[1]: Nothing to be done for `check-am'.
snomos commented 5 years ago

Like fullt:

$ echo "- Čorgen bargu lea dakkár bargu maid dál sáhtán bargat" \
| divvun-checker -a tools/grammarcheckers/se.zcheck | jq .
{
  "errs": [
    [
      "Čorgen bargu",
      2,
      14,
      "msyn-compound",
      "\"Čorgen bargu\" orru leamen goallossátni",
      [
        "čorgenbargu"
      ],
      "Goallosteapmi"
    ]
  ],
  "text": "- Čorgen bargu lea dakkár bargu maid dál sáhtán bargat"
}