3

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!

pnuts
  • 58,317
  • 11
  • 87
  • 139
Rafael Paz
  • 497
  • 7
  • 22
  • I'm sorry, what is the difference between Grammar checker and Spell checker? What is exactly the feature that you need? – bpgergo Jun 18 '12 at 15:04
  • Ok, here we go: Spell checker= detect if a word is written right. For exemple: shirrt is wrong the correct is shirt. Grammar checker detect is a setence is written right. For exemple: He have a car is wrong. The correct setence is He has a car. I'm googling here, but I cant find anything in portuguese! – Rafael Paz Jun 18 '12 at 17:08
  • I see, thanks for your response. I've never done sentence correction, so I'm at my wits and. I'd suggest [LanguageTool](http://www.languagetool.org/) but I'm afraid [rules for Portuguese hasn't been created yet](http://www.languagetool.org/languages/). – bpgergo Jun 19 '12 at 10:53
  • I took a look at Language Tools. It seems to be a nice tool for grammar checking, but unfortunately it has no support to portuguese language. – Rafael Paz Jun 19 '12 at 13:03

3 Answers3

1
  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
bpgergo
  • 15,669
  • 5
  • 44
  • 68
0

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.

Daniel Naber
  • 1,594
  • 12
  • 19
0

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.

Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186