Back to LanguageTool Homepage - Privacy - Imprint

Language detection - how to?


(Vincenzo) #1

Hi all,
I am asking this question because I was unable to find an answer in the help pages and javadocs.
I'd like to use languagetool API to detect the language of a word or sentence.
It's not clear to me whether this tool can do this, can anyone please help and/or provide pointers?
Thanks, regards
Vincenzo


(Daniel Naber) #2

Am 31.05.2013 15:08, schrieb Vincenzo [via LanguageTool User Forum]:

I am asking this question because I was unable to find an answer in
the help pages and javadocs.
I'd like to use languagetool API to detect the language of a word or
sentence.
It's not clear to me whether this tool can do this, can anyone please
help and/or provide pointers?

LanguageTool simply uses Tika, so if you just need language detection,
you should use Tika directly (class
org.apache.tika.language.LanguageIdentifier). This will not properly
work for single words or short phrases, you will need longer texts
(maybe > 30 characters).

Regards
Daniel

--
http://www.danielnaber.de


(Vincenzo) #3

Thanks so much, your answer helped me a lot
Vincenzo