LanguageToolChecker french

4 views
Skip to first unread message

Yassin TOULLICHI

unread,
Sep 4, 2019, 10:18:16 AM9/4/19
to dkpro-core-user
Hi,

i use LanguageToolChecker with french language, i use the class test, for english it works fine but for french he don't show seggestions

String testDocument = "comment modifer un compte";

AnalysisEngine engine = AnalysisEngineFactory.createEngine(LanguageToolChecker.class,
LanguageToolChecker.PARAM_LANGUAGE, "fr");

JCas aJCas = engine.newJCas();

TokenBuilder<Token, Sentence> tb = new TokenBuilder<>(Token.class, Sentence.class);
tb.buildTokens(aJCas, testDocument);
engine.process(aJCas);

// copy input match type annotations to an array
int count = 0;
for (GrammarAnomaly ga : JCasUtil.select(aJCas, GrammarAnomaly.class)) {
System.out.println(
"Error " + (count + 1) + " (" + ga.getBegin() + ", " + ga.getEnd() + "):" + ga.getDescription());
count++;
}

output test :

Error 1 (0, 7):Cette phrase ne commence pas par une majuscule
Error 2 (8, 15):Faute de frappe possible trouvée

How to explain this problem?

Best regards
Yassin  

Richard Eckart de Castilho

unread,
Sep 4, 2019, 12:07:31 PM9/4/19
to dkpro-core-user
On 4. Sep 2019, at 16:18, Yassin TOULLICHI <yassint...@gmail.com> wrote:
>
> How to explain this problem?

Actually, at the moment, the LanguageToolChecker doesn't fill in suggestions at all, not
even in English. The suggestions would be accessible via `ga.getSuggestions()`.

I have opened an issue/PR for this:

https://github.com/dkpro/dkpro-core/pull/1411

Cheers,

-- Richard
Reply all
Reply to author
Forward
0 new messages