Bug Hunting Session
Bug 31059 - A grammar checking in LibreOffice
Summary: A grammar checking in LibreOffice
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Andras Timar
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-22 13:18 UTC by russianneuromancer
Modified: 2013-11-14 22:38 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Sentence checking patch for English dictionary extension (53.64 KB, text/plain)
2011-12-06 00:57 UTC, László Németh
Details
Hungarian sentence checking patch for the Hungarian dictionary extension (120.01 KB, text/plain)
2011-12-06 00:57 UTC, László Németh
Details
Test file and documentation for the sentence checking patches (86.85 KB, application/vnd.oasis.opendocument.text)
2011-12-06 00:59 UTC, László Németh
Details
Documentation for the sentence checking patches (PDF) (157.24 KB, application/pdf)
2011-12-06 01:01 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description russianneuromancer 2010-10-22 13:18:47 UTC
Please provide grammar checking mechanism in the LibreOffice.
Comment 1 russianneuromancer 2010-10-22 13:21:48 UTC
Maybe include Language Tool in LibreOffice? Or, if it's not possible or if there available better solution, maybe rules created for Language Tool can be useful?
Comment 2 Noel Power 2010-10-27 03:03:29 UTC
languagetool is provided in beta2
Comment 3 Michael Meeks 2010-10-27 09:07:08 UTC
We should prolly file the "Encourage LanguageTool to be in C++ or python, not Java" bug though :-)
Comment 4 russianneuromancer 2011-01-04 16:08:19 UTC
Since RC2 LanguageTool is not part of LibreOffice anymore. Now opened again.
Comment 5 Michael Meeks 2011-01-05 02:21:44 UTC
Good point; the basic complaint was a lack of translation, that and the Java requirement which tends to plague Windows users without Java with tens of annoying dialogs on first-start :-)
Comment 6 Yakov 2011-01-25 08:46:58 UTC
Translation interface fixed in LanguageTool 1.1 and higer.
http://www.openoffice.org/issues/show_bug.cgi?id=114078

Alternative grammar checking extension is Lightproof.
Lightproof is written on Python.
http://extensions.services.openoffice.org/en/project/lightproof
But Lightproof is less powerful then LanguageTool.
Comment 7 Michael 2011-02-02 11:41:01 UTC
It would be nice if eventually java free grammar/style/similar stuff checking could be included inside libreoffice, but something more powerful than lightproof or even languagetool. I don't know if something like that would fit in with this bug though.
Comment 8 Yakov 2011-02-05 22:10:07 UTC
It maybe old Python version of Languagetool 
http://tkltrans.sourceforge.net/gram.htm
But this version have not OpenOffice/LibreOffice integration.
Comment 9 László Németh 2011-02-09 05:04:23 UTC
I plan to fix this issue in the next few months, based on Lightproof, partially extending the English Lightproof demo with the results of LanguageTool development, too. But I strongly think, with the default settings the proofreader doesn't have to hurt the users any false warning messages. The Grammalecte French grammar checker extension (released a few days ago by its author, Olivier Ronez, athe developer of the French spelling dictionary) also follows this conception. Grammalecte is based on Lightproof: in their grammar rules it uses Hunspell and the installed French Hunspell dictionary for morphological analysis, also it has native Options menu in LibreOffice (see http://www.dicollecte.org/grammalecte/documentation.php).

It seems, Microsoft has also problems with their grammar checker:

"It would be possible to 'dial up the sensitivity' of the Word grammar checker to catch more errors, the company said. However, that could also cause it to flag sentences considered correct in colloquial usage.

That would risk making the tool more intrusive than people want, the company said. In fact, Microsoft dialed down the sensitivity of the grammar checker in certain respects starting in 2002, responding to customer feedback." See http://www.seattlepi.com/business/217802_grammar28.asp
Comment 10 mnedeleg 2011-03-18 06:36:23 UTC
Have you heard about Gramadoir?

It's an open source grammar checking engine developed by Kevin Scannel:
http://borel.slu.edu/gramadoir/index.html
I haven't tried it but it seems to be usable and well documented.

Kevin Scannel is also involved in the irish translation of LibreOffice.

There is an effort to integrate it on OpenOffice:
http://www.beta.scriobh.ie/Page.aspx?id=38&l=2

Hope that helps.
Comment 11 Yakov 2011-05-12 08:43:45 UTC
Any progress?
Is planned grammar checker in LibreOffice 3.4?
Comment 12 Jeffrey 2011-06-16 01:23:01 UTC
This sounds like an enhancement... so I will mark it as such.
Comment 13 Yakov 2011-10-17 12:58:06 UTC
Is it possible  add this grammar checker extensions (based on LightProof) to LibreOffice 3.5?


Lightproof grammar checker for Russian 
http://extensions-test.libreoffice.org/extension-center/lightproof-grammar-checker-for-russian
Grammalecte grammar checker for French
http://extensions-test.libreoffice.org/extension-center/grammalecte

Lightproof grammar checker for Hungarian
http://extensions-test.libreoffice.org/extension-center/magyar-mondatellenorzo
Comment 14 László Németh 2011-12-06 00:57:03 UTC
Created attachment 54135 [details]
Sentence checking patch for English dictionary extension

These patches add non-intrusive sentence/grammar checking to the
English and Hungarian dictionary extensions based on the Lightproof
Python environment, see the attached test file/documentation.
It uses LibreOffice resources (Hunspell spell checker, Calc functions
etc.) for complex tasks: dictionary lookup, morphological analysis or
optional measurement conversion.
Recent English dictionaries of LibreOffice have contained only partial
part-of-speech and morphological data, yet, but extending the
dictionary, we will be able to add more complex grammar rules, too
(like the Hungarian and French Lightproof based extensions).
Comment 15 László Németh 2011-12-06 00:57:56 UTC
Created attachment 54136 [details]
Hungarian sentence checking patch for the Hungarian dictionary extension
Comment 16 László Németh 2011-12-06 00:59:17 UTC
Created attachment 54137 [details]
Test file and documentation for the sentence checking patches
Comment 17 László Németh 2011-12-06 01:01:40 UTC
Created attachment 54138 [details]
Documentation for the sentence checking patches (PDF)
Comment 18 László Németh 2011-12-06 01:12:43 UTC
Short description about the Lightproof integration with the dictionary extensions (it is not an automatic process yet):

1. Copy dialog/* and pythonpath/* directories and Lightproof.py, Linguistic.xcu of your Lightproof extension to the dictionaries/your_language/ directory of LibreOffice.

2. Extend COMPONENT_FILES variable of makefile.mk with these new files.

3. Extend manifest.xml with the following elements:

    <manifest:file-entry manifest:full-path="dialog/OptionsDialog.xcs"
                manifest:media-type="application/vnd.sun.star.configuration-schema" />
        <manifest:file-entry manifest:full-path="dialog/OptionsDialog.xcu"
                manifest:media-type="application/vnd.sun.star.configuration-data" />
        <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=Python"
                manifest:full-path="Lightproof.py"/>
        <manifest:file-entry
                manifest:media-type="application/vnd.sun.star.configuration-data"
                manifest:full-path="Linguistic.xcu" />

4. Change extension ID of dialog/OptionsDialog.xcu to the ID of the dictionary extension (see in description.xml):

<prop oor:name="Id">
    <value>org.openoffice.en.hunspell.dictionaries</value>
</prop>
Comment 19 Caolán McNamara 2011-12-08 09:16:13 UTC
this is integrated into master now I believe.

Can you give me an English grammar error which LightProof should be able to detect ?
Comment 20 Caolán McNamara 2011-12-08 09:18:35 UTC
oops, I see there's a sample attachment here of stuff it can detect. Yup that one works.
Comment 21 Gerry 2012-06-26 03:23:33 UTC
I grammar checking in the Linux version actually included? Having had a look at the manual here (http://www.numbertext.org/lightproof/sentencecheck.pdf), I could not get it working. As far as I understood, a functioning LightProof grammar checker depends on the existence of the right dictionary "English spelling and hyphenation dictionaries and thesaurus 2011.12.05". This extension seems to be not coming with the Ubuntu PPA. At least in my extension manager it is missing and I could not find it anywhere on the internet.
Is my assumption right that the Lightproof grammar checker is missing on Linux?
Comment 22 László Németh 2012-06-27 17:24:30 UTC
(In reply to comment #21)
Parts of the English dictionary extension are separated in different Ubuntu packages, but it seems, platform-independent grammar checking component of the original LibreOffice dictionary extension hasn't been supported in Ubuntu, yet.
Debian has got a single grammar checker package here: http://packages.debian.org/sid/libreoffice-lightproof-en, perhaps it works with Ubuntu, too. (If not, try this oxt LibreOffice extension: http://numbertext.org/tmp/lightproof_en-0.4.2.oxt)