Question

I'm working on a journalist project in Brazil, so I need to find a Java API that is able to check spelling and grammar documents from Open Office or Microsoft word document. I did some research on google and found some cool API like LanguageTools but what I need is an API that works with Portuguese - Brazil. I was able to develop the check spelling with UNO API and Hunspell, but I was not able to develop the grammar check.

The only grammar check that I was able to find was CoGroo, but it's not an API, just a extension for Open Office documents.

This is a very important project, so if anyone could help me with this situation I'll be very grateful!

Was it helpful?

Solution

The CoGroo extension (*.oxt) is just a ZIP file, you can rename it to *.zip, unzip it and will find several JAR files. Thus chances are good you can use it as an API from Java.

OTHER TIPS

  1. Hunspell is the open source spell checker in LibreOffice/OpenOffice http://en.wikipedia.org/wiki/Hunspell
  2. Java binding for Hunspell https://code.google.com/p/hunspell4eclipse/source/browse/#svn%2Ftrunk%2Fcom.lorands.hunspell4eclipse.hunspelljna
  3. an other Java binding (just in case) http://dren.dk/hunspell.html
  4. Dictionaries for Hunspell http://wiki.services.openoffice.org/wiki/Dictionaries

You might want to add your own user defined rules to Languagetool for the differences between Portuguese and Brazilian Portuguese. This input is probably also most welcome by the Languagetool community to add it to the language-modules/pt source code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top