oleh12
(oleh)
August 25, 2023, 1:34pm
1
curl --data “language=en&text=testf” http://localhost:8010/v2/check
Does not show Spelling mistake
curl --data “language=en-GB&text=testf” http://localhost:8010/v2/check
Show Spelling mistake
Why it does not show errors when the language is specified in short code (‘en’, ‘de’)?
What parameters should I run the LanguageTool with so that it shows a spelling mistake with a short language code?
Thanks
dnaber
(Daniel Naber)
August 25, 2023, 1:35pm
2
If you use just en
, LT doesn’t know which dictionary to use. So always set the specific code with a variant (like en-US
) to activate spelling.
oleh12
(oleh)
August 25, 2023, 2:25pm
3
Can I define which dictionary to use by default for English when it is not defined?
dnaber
(Daniel Naber)
August 25, 2023, 2:34pm
4
Yes, see preferredVariants
in the API docs .
1 Like