View previous topic :: View next topic |
Author |
Message |
TimArends Agent
Joined: Feb 02, 2009 Posts: 13
|
Posted: Sun Feb 08, 2009 11:14 am Post subject: Grammar checking works for selection but not whole document |
|
This may be because I have a 193 page document, but when I choose Tools > Add-ons > Check Grammar > Entire Document, it says "No grammar errors found," but when I select a few pages of text first, it finds plenty of possible errors. I like for it to be able to find errors without selecting text first, and I also like the little squiggly green line that shows up for grammar errors in some OSX programs but not Writer. |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Sun Feb 08, 2009 11:27 am Post subject: |
|
If you are getting no errors, then Mac OS X's grammar checking service is telling NeoOffice that there are no errors.
Please understand that we did not write custom grammer checking code and, instead, we merely send the selected text to Mac OS X's built-in grammar checking service and display and errors that it sends back. So, if Mac OS X's grammar checking services says the text is OK, then there is nothing we can do to change that.
As for the green underline, that is not possible to implement as it would require us to funnel every keystroke through NeoOffice's underlying OpenOffice.org grammar checking service. That service, in turn, would cause the entire paragraph to be sent to the Mac OS X spellchecking service with every keystroke and would make NeoOffice grind to a near halt. More details about this are in this forum topic.
Patrick |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Sun Feb 08, 2009 11:32 am Post subject: |
|
I should also add the Mac OS X spellchecking service currently only supports English and, frankly, is at best a fairly limited grammar checker. While it is good to see that Apple added a grammar checker in Mac OS X 10.5 Leopard, the reality is that their grammar checker has a long ways to go before it matches Microsoft Office's proprietary grammer checker.
Given that, I would definitely not assume that the grammar checker will find all grammar errors.
Patrick |
|
Back to top |
|
|
Samwise Captain Naiobi
Joined: Apr 25, 2006 Posts: 2315 Location: Montpellier, France
|
Posted: Sun Feb 08, 2009 3:11 pm Post subject: |
|
I cannot reproduce this issue.
If I create a test document, with one page of grammatical mistakes (and the rest correct), running Tools > Add-Ons > Check Grammar > Entire Document gives me the same results as selecting the page of mistakes and running Tools > Add-Ons > Check Grammar > Selected Text.
Can you attach the file you're having trouble with to your post, so that we can have a look and possibly determine what's causing the issue for you ?
How to attach files to your post |
|
Back to top |
|
|
TimArends Agent
Joined: Feb 02, 2009 Posts: 13
|
Posted: Sun Feb 08, 2009 10:03 pm Post subject: |
|
Thanks, the file is right here. |
|
Back to top |
|
|
Samwise Captain Naiobi
Joined: Apr 25, 2006 Posts: 2315 Location: Montpellier, France
|
Posted: Mon Feb 09, 2009 7:56 am Post subject: |
|
With your sample document, I can now reproduce the issue.
For example, selcting the text between "Introversion" ( page 18 ) and "It just ain't so" ( page 20 ) and running Tools > Add-Ons > Check Grammar > Selected Text return three possible grammar errors.
However, running Tools > Add-Ons > Check Grammar > Entire Document only returns "No grammar error found".
Edit: I don't know why the grammar checker is behaving this way with your document. Moreover, when checking Spelling and Grammar in TextEdit, I do not get the same errors as in NeoOffice (on the same selection, 3 errors, but only 2 are the same, and the third is different).
Perhaps Ed (who wrote the Mac OS X grammar checker integration for NeoOffice, IIRC) has an idea of what could be causing this? |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon Feb 09, 2009 9:29 am Post subject: |
|
Samwise wrote: | Edit: I don't know why the grammar checker is behaving this way with your document. Moreover, when checking Spelling and Grammar in TextEdit, I do not get the same errors as in NeoOffice (on the same selection, 3 errors, but only 2 are the same, and the third is different). |
That is the difficult part to determine. While TextEdit also uses the Mac OS X grammar checking service, what it actually passes to the service is unknown since Apple's TextEdit code is proprietary. My guess is that TextEdit is not passing the entire text in one chunk to the Mac OS X grammar checking service.
Patrick |
|
Back to top |
|
|
sardisson Town Crier
Joined: Feb 01, 2004 Posts: 4588
|
Posted: Mon Feb 09, 2009 10:55 am Post subject: |
|
pluby wrote: | since Apple's TextEdit code is proprietary. |
FYI, the TextEdit source code is actually one of the example projects in the Developer folder you get when installing Xcode (I think it lives in the AppKit examples).
Not that this will help reverse-engineering the grammar checker behavior, particularly if the behavior is actually part of NSTextView rather than TextEdit itself....
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
|
Back to top |
|
|
aussie149 The Merovingian
Joined: Feb 12, 2005 Posts: 607 Location: Australia
|
Posted: Mon Feb 09, 2009 5:29 pm Post subject: But... |
|
Hi Patrick
This patch is now working for me, I'm pleased to say However, what I am finding is that the window with the corrections appears above the page where I initiated the request for grammar checking. It would certainly be preferable to have what happens with the spellchecker, which is that the display moves in turn to the place where each error occurs. I presume this is an OOo thing? I've added attachments in case I haven't made sense.
Peter |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon Feb 09, 2009 6:19 pm Post subject: Re: But... |
|
aussie149 wrote: | Hi Patrick
This patch is now working for me, I'm pleased to say However, what I am finding is that the window with the corrections appears above the page where I initiated the request for grammar checking. It would certainly be preferable to have what happens with the spellchecker, which is that the display moves in turn to the place where each error occurs. I presume this is an OOo thing? I've added attachments in case I haven't made sense.
Peter |
Sorry, but this feature request is not feasible as there is now way to query a text run's position on screen through the OpenOffice.org Basic macro language.
Patrick |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
|
Back to top |
|
|
|