Bug 75922 - EDITING: Spelling and Grammar: English - "Correct All" (Change All) button corrects only a single instance
Summary: EDITING: Spelling and Grammar: English - "Correct All" (Change All) button co...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version: 4.2.0.4 release
Hardware: x86 (IA32) Windows (All)
: medium major
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-08 21:47 UTC by Peter CM
Modified: 2015-01-05 14:28 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Peter CM 2014-03-08 21:47:23 UTC
I'm running OpenOffice 4.2.0.4 on Windows 7 (using the US-International Keyboard). 

When I run a Spelling and Grammar check and come across a misspelled word, the "Correct All" button does not automatically correct every instance of the word throughout the document. Instead, it functions exactly the same as the "Correct" [Correct This Time Only] button, correcting only the single highlighted instance. Because this bug can hugely increase the time and attention required of users to run Spelling and Grammar checks, and increases the likelihood of inconsistent corrections, it qualifies as MAJOR. 

Related bugs, to be filed separately:

* The "Always Correct" button below the "Correct All" button in the actual Spelling and Grammar module is undocumented and appears to be entirely nonfunctional (i.e., it doesn't appear to do anything at all).

* The error correction buttons in the actual Spelling and Grammar module are labeled "Correct", "Correct All", and "Always Correct". The help module and online documentation (still?) refer to them as "Change" and "Change All". (As noted earlier, the "Always Correct" / "Always Change" button seems to be entirely undocumented.)

An unrelated bug, to be filed separately:

* After a new word is added to a dictionary, other instances of that word in the Spelling and Grammar checker's text selection are still flagged as unknown. The dictionaries are apparently not checked again until the checker has moved on to a new text selection. (Example: The checker's selection includes the sequence "Raggmopp! Raggmopp! Raggmopp!" The first Raggmopp is flagged as unknown and the user adds it to a dictionary. The second Raggmopp is flagged, despite having been added to the dictionary. Once the checker has moved on to a different text selection, however, further instances of Raggmopp are no longer flagged.)
Comment 1 Dominique Boutry 2014-03-13 13:11:00 UTC
Hi.

"Related bugs, to be filed separately" : You are perfectly right, just do it... ;-)

First bug :
- It seems to me that the "correct [once]" or "correct all" process the current occurence or all occurences WITHIN the selection. If you want to process your whole text, select it before running the Spelling and Grammar check.

Second bug :
- I agree, undocumented and inoperant

Third bug :
- I reproduce/agree

Fourth bug :
- I don't reproduce (LibO 4.2.1.1 on Win7). It works for me.
Comment 2 Peter CM 2014-03-13 18:39:20 UTC
In the first line of my bug report I meant to write that I am running LibreOffice 4.2.0.4, not OpenOffice. Sorry. (Is there an edit button somewhere?)

Dominique:

Unfortunately, only two of the four bug reports I submitted seem to have actually posted: this one and the one about the "Always Correct" button being undocumented and nonfunctional/inoperative. I guess I'll try to resubmit the others. 

What with the addition of an apparently new, undocumented, inoperative "Always Correct" button, it's hard to know how the spellcheck module's designers intend the "Correct All" button to work. The documentation says only that it "replaces all occurrences of the unknown word with the current suggestion."

If I were limiting my spellcheck to text I've selected in the document, I would expect it to replace all occurrences within the selection. If I were running a spellcheck without having selected text -- i.e., from the cursor's position in the document forward, toward the end of the document (and optionally resuming from the beginning of the document after being prompted) -- I would expect it to correct every instance it found until the spellcheck is terminated.

Ignoring for the moment what the "Always Correct" button might be intended to do differently from the "Correct All" button, having to select text for the "Correct All" button to function is not practical, since some corrections (e.g., deleting stray paragraph breaks) require you to switch focus from the spellchecker back to the document. If you had selected the entire document, you would have to exit the spellchecker, make your correction, and then select forward to the end of the document before launching the spellchecker again ... each time you make a manual correction to the document. 

Moreover, you apparently can't even launch the spellchecker if you text selection includes an index field. (The document I'm working on right now has a table of contents; if I select the entire document, the spellchecker won't launch.) Having to manually select text for the "Correct All" button to work requires extra thinking and work and defeats the purpose of automation. As I said, it's not practical.

Finally, if the "Correct All" button isn't supposed to work unless you've selected text, why isn't it grayed out or simply not displayed when no text has been selected?
Comment 3 Thomas Hackert 2014-04-06 14:45:53 UTC
Hello Peter, *,
I cannot confirm your first part of this bug with LO Version: 4.1.5.3
Build-ID: 1c1366bba2ba2b554cd2ca4d87c06da81c05d24 nor with Version: 4.2.3.3
Build ID: 6c3586f855673fa6a1576797f575b31ac6fa0ba3 (parallel installed, following the instructions from https://wiki.documentfoundation.org/Installing_in_parallel), both with Germanophone help- as well as langpack ... :( All wrongly written words were corrected, when I press the "Correct All" button.

What I did:
1. Created a new Writer document
2. Inserted "Dies ist eni Test." (should be "Dies ist ein Test.")
3. Marked the sentence and C&P it a couple of times
4. Set the cursor at the beginning of the document
5. Pressed <F7>
6. Clicked on "Correct All"

All wrongly written "eni" were changed to the correctly written "ein" ... ;)

To your related bug: In my Germanophone version it is called "AutoKorrektur", and if you press the Help button, you will find a page to its function (though not directly. You have to click on "Menü" – "Extras" – "Rechtschreibung" and on the link "Dialog Rechtschreibprüfung" to get to the text
<quote>
AutoKorrektur
Überträgt die aktuelle Kombination aus beanstandetem Wort und korrigiertem Wort in die Ersetzungstabelle der Funktion AutoKorrektur.
</quote>

, roughly translated:

<quote>
AutoCorrect
Transfers the current combination of the questioned word and the corrected word to the replacement table of the function AutoCorrect.
</quote>

). You can test it, if you go to "Tools – AutoCorrect Options..." and search for a word, that is missing there. Then write this word in a Writer document, start the spellchecking dialog and press "Always Correct". The word should be in the "AutoCorrect Options" then. The only bug there might be, that the AutoCorrect function is meant and therefor this button is labeled incorrectly ... :(

Please open separate bugs instead of one with several problems/bugs in it in the future. Otherwise someone else might close them as invalid ... ;) And as you have found this bug in Apache OpenOffice, you should report it to their bugzilla ... ;)
Sorry for the inconvenience
Thomas.
Comment 4 tommy27 2014-05-03 07:40:19 UTC
@Peter CM
please put the other bug reports links under the "See also" field

moreover I strongly suggest to upgrade to LibO 4.2.3.3 or wait one more week for 4.2.4.2 (see release schedule here https://wiki.documentfoundation.org/ReleasePlan/4.2 ) since the 4.2.0 version you use was a very early release with lot of bugs (more than 400 bugs have been fixed meanwhile).
Comment 5 tommy27 2014-10-21 19:16:31 UTC
please give an update of the bug status with current LibO 4.2.6.3 or 4.3.2.2 releases.
Comment 6 Peter CM 2014-10-22 02:35:49 UTC
I just updated to 4.3.2.2 but won't be able to do any testing until this weekend at the earliest.
Comment 7 Peter CM 2014-10-27 21:57:41 UTC
Sorry for the additional delay. Due to a wind storm, there were major power and Internet outages in my area over the weekend.

"Correct all" seems to work for the most common pattern of multiple occurrences of the same misspelled word -- specifically, where the misspellings are separated by other words. For example, when you click "Correct all" for the first instance of "ocurence" in the following sentence:

“Correct all” should correct each ocurence and every ocurence of the highlighted misspelling.

the sentence is appropriately corrected to: 

“Correct all” should correct each occurrence and every occurrence of the highlighted misspelling.

HOWEVER, there is a problem with how the Spelling Checker finds and selects subsequent misspellings to correct, and in some cases in how it applies the correction -- specifically, where the misspellings are not separated by other words. (This is not merely a hypothetical possibility; I encountered it in real life while spell-checking a manuscript.) I designed a couple of "extreme-case" blocks of misspelled text to showcase the problem:

When I used "Correct all" to correct "Ocurence" to occurrence" in the following paragraph:

I said “ocurence, ocurence, ocurence.”

I got:

I said “occurrence, occurrence, ocurence.” [last "ocurence" not corrected]

When I used "Correct all" for each misspelled word in the following block of five identical one-sentence paragraphs:

Teh the quikc quikc brwon brwon fxo fxo jmps jmps ovre ovre teh teh layz layz dgo dgo.

Teh the quikc quikc brwon brwon fxo fxo jmps jmps ovre ovre teh teh layz layz dgo dgo.

Teh the quikc quikc brwon brwon fxo fxo jmps jmps ovre ovre teh teh layz layz dgo dgo.

Teh the quikc quikc brwon brwon fxo fxo jmps jmps ovre ovre teh teh layz layz dgo dgo.

Teh the quikc quikc brwon brwon fxo fxo jmps jmps ovre ovre teh teh layz layz dgo dgo.

I got:

The the quick quick brwobrown brown fox fox jmjumps jumps over over the the lazy lazy dgodog dog. [three selection/correction failures]

The the quick quick brown brown fox fox jumps jumps over over the the lazy lazy dog. dog. [period incorrectly added after first "dog"]

The the quick quick brown brown fox fox jumps jumps over over the the lazy lazy dog. Dog. [period incorrectly added after first "dog" and second "dog" incorrectly capitalized]

The the quick quick brown brown fox fox jumps jumps over over the the lazy lazy dog. dog. [period incorrectly added after first "dog"]

The the quick quick brown brown fox fox jumps jumps over over the the lazy lazy dog. dog. [period incorrectly added after first "dog"]

So, as I said, there seems to be a problem with how the Spelling Checker finds and selects subsequent misspellings to correct. I'm not a coder, so I can't even guess why it added periods (full stops) to the first "dog"s, or why it capitalized one of them, unless AutoSpellcheck somehow got activated despite being reported as de-activated everywhere in the interface (toolbar icon, Spell Checker Options, Tools > Options > Language Settings > Writing Aids). 

NOTES:

AutoSpellcheck was "turned off" during all of these tests. However, I noticed that "teh" was nonetheless automatically corrected to "the" as I typed.

I ran these tests in both 4.2.0.4 (the version I was running when I initially submitted the bug) and in 4.3.2.2 (the current release version, which I am running now). I'm pretty sure the results were exactly the same; the same general problem was definitely present in both versions.
Comment 8 tommy27 2014-10-27 22:25:29 UTC
(In reply to Peter CM from comment #7)
> 
> 
> When I used "Correct all" to correct "Ocurence" to occurrence" in the
> following paragraph:
> 
> I said “ocurence, ocurence, ocurence.”
> 
> I got:
> 
> I said “occurrence, occurrence, ocurence.” [last "ocurence" not corrected]

I confirm bug under Win7x64 using LibO 4.3.2.2
status NEW
Comment 9 Marcin Miłkowski 2015-01-05 14:28:08 UTC
This is not related to English only, we had reports of the same thing happening in any language that has a grammar checker installed in LO.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.