Back to LanguageTool Homepage - Privacy - Imprint

Patchwork


(Lupo) #1

I developed an application for authors and am interested to include language tool as in LibreOffe e.g.

What can my next steps be?
Can I get some information from languagetool-commandline.jar?
Does exist an API?

Thanks,
Lupo


(Daniel Naber) #2

Hi Lupo,

thanks for your interest in LanguageTool. In case your application is written in Java, you could use our Java API (https://languagetool.org/development/api/). Otherwise, I'd recommend using the HTTP interface, which is documented at http://wiki.languagetool.org/http-server. We also provide a public server, see http://wiki.languagetool.org/public-http-api.

You could also call the command-line version, but that has some start up cost and I wouldn't recommend it.

Please let us know if you have more questions.

Regards
Daniel


(Lupo) #3

Thanks, Daniel, for your immediate answer!

My application (Patchwork) is written in Delphi (Pascal). Online check is not optimal because some writers use offline computers to write or don't have a web connection all the time.
Why is the command-line solution not recommendable? What do you mean with start up cost? And how do I get the result from the command-line version to integrate it into Patchwork?

Regards
Lupo


(Daniel Naber) #4

Hi Lupo. Users don't need web access, they can run LT and visits its configuration dialog to enable a server. It will then run, by default, on localhost, port 8081.

Using the command line will require the whole Java and LT start for every check, this can take 2-3 seconds, additionally to the time the check itself takes. If you want to use that anyway, you can call LT like this: java -jar languagetool-commandline.jar --api -l en . It will print out XML with error information which you need to parse.


(Lupo) #5

Hi Daniel, another possibility would be a transcription to Delphi as open source extension. Where can I have a look at the source code of the language tool engine? I assume the biggest part of the brain are the rules?


(Daniel Naber) #6

The source is available at https://github.com/languagetool-org/languagetool. It's quite complex and needs several external libraries, which would also need to be ported, so I don't think that this is a viable approach.