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.freedesktop.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.
_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel