JLanguageTool(object).check("text"); not detecting spelling mistakes?

Hi,

I called following methods
JLanguageTool langTool = new JLanguageTool(Language.ENGLISH);
langTool.activateDefaultPatternRules();
langTool.getAllRules();

but when I called langTool.check(“text”); it is only giving suggestions for grammatical mistakes, it’s not giving
suggesions for spelling mistakes. Please help me.

Thank you,
Rajesh Chejerla

I got the solution,

use JLanguageTool langTool = new JLanguageTool(Language.AMERICAN_ENGLISH); rather than using
JLanguageTool langTool = new JLanguageTool(Language.ENGLISH);

Regards,
Rajesh

1 Like