On Friday 11 May 2012 19:46:03 Garima Joshi wrote: > Hi, > Here are some ideas based on my research done regarding available libraries > for grammar check in calligra words. We need to implement a grammar > checking plugin named grammarcheck inside calligra/plugins/textediting. > This plugin will be based on the spell check plugin and will have some > code, for example, the text highlighting code in common. > > One option is grammarcheck plugin will use the link-grammar library already > used by AbiWord, which provides an API to parse sentences, tokenize them, > and provide linkages as result. This library has been customized by AbiWord > to serve the purpose of grammar checking in documents. This is a link to > the project > http://www.abisource.com/projects/link-grammar/ > Here is some documentation for the API > http://www.abisource.com/projects/link-grammar/api/index.html > > This documentation, along with the AbiWord source code itself (the part > that integrates the link-grammar parser and checker), can serve as a good > example as to how to integrate the library in our grammarcheck plugin. > > http://svn.abisource.com/abiword/trunk/plugins/grammar/linkgrammarwrap/ > http://svn.abisource.com/abiword/trunk/plugins/grammar/xp/ > > Another option is LanguageTool can be used to implement grammarcheck. > http://www.languagetool.org/ <http://www.languagetool.org/usage/> > It is already used as a plugin to OpenOffice.org and LibreOffice. > We will write a wrapper in order to use LanguageTool. > http://www.languagetool.org/development/api/ > http://wiki.services.openoffice.org/wiki/Grammar_Checking > http://cgit.freedesktop.org/libreoffice/core/languagetool<http://cgit.freed > esktop.org/libreoffice/core/tree/languagetool> > > The implementation details of this proposal will be more detailed as > I investigate the source codes(mentioned in the above links) further. > > The plugin will function on the basis of a pre-supplied dictionary. > On the usability part, the plugin can be turned on/off at will of the user, > and different grammar mistakes which are highlighted can be chosen to be > ignored (once, or always). Also, there maybe an option to auto detect > language context, that will understand if the language currently being > written in is English, and only then turn on grammar checking accordingly. > > I need suggestions on which library to use for grammar check support in > calligra words. Above are the two possible options which i prefer. Any > other library or any suggestions are welcome. Hi Garima
This serves as a very good introduction. We need however to learn more about each of those alternative work before we can make a decision. and not just from a code point of view but also in how good a job it does. Also you seem to have missed that libreoffice 3.5 introduced a new tool based on lightproof http://libreoffice.hu/2011/12/08/grammar-checking-in-libreoffice/ Another avenue worth investigating is an idea i just got. Why not do something like bayesian spam filters do. Learn from known goo grammar. And let the user allow the filter checker to learn more. With get hot new stuff so you can download other languages as users make them. This would be a totally new way of doing it. I'm willing to bet on this. If it doesn't work out well fine, if it does then great. Just let us make sure that the teextediting grammarplugin is not too tied in to what ever backend we do. Then we can always change our mind later. And doing some frontier work will be really fun. Boemann _______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel