Bug 61167 - Suggestions for titlecase prohibited words in user dictionary
Summary: Suggestions for titlecase prohibited words in user dictionary
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
(earliest affected) Master
Hardware: Other All
: medium minor
Assignee: Not Assigned
Whiteboard: target:4.4.0
Depends on:
Reported: 2013-02-20 13:20 UTC by Urmas
Modified: 2019-10-03 10:23 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:

screenshot of the dialog showing the two possibilities of bar and Bar (32.13 KB, image/png)
2014-02-21 10:53 UTC, sophie

Note You need to log in before you can comment on or make changes to this bug.
Description Urmas 2013-02-20 13:20:46 UTC
1. Create a new user-defined spellchecking with Exception property
2. Add the pair foo->bar there
3. Type Foo somewhere in the document

Actual result: no spelling suggestions displayed.
Expected result: word Bar offered as a suggestion.

This should be brought in line with the recent support for cased suggestions with standard user dictionaries.
Comment 1 Michael Meeks 2013-02-26 13:58:55 UTC
Hi Urmas; sorry I had a poke at this but couldn't find where that is; that's a shame because I moved onto another bug. Can you provide a path in the UI to the "user-defined spellchecking with Exception" functionality ie. Edit->Insert->foo type thing ? :-)

It really does pay to not assume that everyone else is as much of an expert as you are.

Also - I assume that this is an Enhancement request ? if so, and assuming we can understand what's needed (and given your grasp of the code) I guess you could prolly add enough pointers to turn this into an easy hack yourself ?
Comment 2 Jorendc 2013-03-19 23:39:49 UTC
I can not reproduce this bug properly, because I don't know how to reproduce it.
@Urmas: As Micheal said, is it possible to be a bit more specific which steps to follow?

Thanks in advance,
Comment 3 QA Administrators 2013-09-24 01:43:58 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team
Comment 4 Urmas 2013-09-24 05:08:46 UTC
I mean "Exception (-)" option available for user-defined dictionaries.

For words written in the same case as the one in such dictionary, there will be replacement offered as a spelling suggestion.

For those which aren't, there is no suggestion.
Comment 5 sophie 2014-02-20 14:38:12 UTC
So to reproduce :
- open a writer document
- go under Tool > Options > Language setting > linguistic
- under User define dictionaries, click on New
- give a name to the dictionary, check Exceptions and close
- select the new dictionary in the list and click Edit
- in the dialog that opens, enter Foo under the Word field and Bar under the Replace by field.
Close all the dialogs to go back to the Writer document.
Type Foo in the document, if it doesn't exist in your language, the dictionary check will underline it. Right click on it, the first proposition in the list will be Bar. If the word exists, no suggestion will be made as there is nothing to correct. 
==> my conclusion, you can't expect a spell checker to make a suggestion when there is nothing to correct. Instead, the replacement table is done to handle those cases or press Ctrl+F7 to bring a list of synonymous. 
Closing, as imho it should not be handled by the spellchecker and can be already set. Sophie
Comment 6 Urmas 2014-02-20 15:42:06 UTC
> - in the dialog that opens, enter Foo under the Word field and Bar under the Replace by field.

Wrong. There is clearly written 'foo' and 'bar' in my report. Not 'Foo'. Not 'Bar'/
Comment 7 sophie 2014-02-20 15:47:26 UTC
Hi, that doesn't change anything, you could have written zut and bou, the behavior would be the same depending on the language you write in and the language of the spell check in use. Read again my description and you will see that this is notified.
If you want to know how to use the other features I've mentioned, please come to the user list and I'll explain how you can achieve what you want. Thanks :) Sophie
Comment 8 Urmas 2014-02-21 01:36:17 UTC
It will offer 'bar' for 'foo', but not 'Bar' for 'Foo', which is the bug.

Please educate yourself about the purpose of exception dictionaries before commenting further.
Comment 9 sophie 2014-02-21 07:00:28 UTC
So, to be more explicite:
- in the dialog that opens, enter Foo under the Word field and Bar under the Replace by field.
replaced by:
- whatever you put in the Word field will have the suggestion that you put in the Replace field, be it Foo, Bar or foo, bar or foo, Bar, or Foo, bar. 
If you disagree with that, please come on the QA list and discuss there, not on the bug itself, Bugzilla est not for discussion. Thanks
Closing again - Sophie
Comment 10 Urmas 2014-02-21 08:51:41 UTC
The suggestion should be in the same register as the word. It is so for custom dictionaries, but not for exception dictionaries.

Please write in English if you wish to comment.
Comment 11 sophie 2014-02-21 08:55:09 UTC
If you want to discuss, please come on the QA list.
Closing again - Sophie
Comment 12 Urmas 2014-02-21 09:00:35 UTC
There is nothing to discuss. The bug is present as described. Stop vandalizing my report.
Comment 13 Florian Reisinger 2014-02-21 09:33:51 UTC

Okay I will give you an example for this. [german words]
There is a noun "Essen" and a verv "essen"
I want to correct "Esssen" to "Essen" and "esssen" to "essen"

So you have to do 2 things
foo -> bar
Foo -> bar
And of course
FOo -> bar
FOO -> bar
fOO -> bar
foO -> bar
FoO -> bar
fOo -> bar

[I agree, as a _feature request_ it would be nice to use Regexpressions (optional)
[Ff][Oo]{2} -> bar would be the thing above in RegEx BUT damn lot of things would need to be rewritten....
The thing you described is NOT a bug, so this bug will be closed. You are free to
a) Submit a feature request [if such not exists yet]
b) (Let it) fix yourself...
Comment 14 Michael Meeks 2014-02-21 10:13:50 UTC
While I have no sympathy for some close / re-open war ;-) I would love to see a chunk of this bug turned into a feature-request; it does indeed seem a shame not to have an annotation saying: "case insensitive" to such replacements, so that we can then try to do a better job of replacing (and matching eg. the case of the initial letter in the replacement).

Sophie - thanks for describing the issue so clearly & please do CC me on the feature bug =)
Comment 15 Urmas 2014-02-21 10:32:30 UTC
Comment #13 has nothing to do with my report.

Please _read_ what I've written in #1 and #8.
Comment 16 Michael Meeks 2014-02-21 10:49:39 UTC
Urmas - please do as asked; and file a feature request here; if only to keep the peace =) [ and to edit out the other comments so it is readable for developers ]. A feature request should have a nice clear description of course.

Florian - in comment #13 - you give an example that (it seems to me) by doing a case insensitive but case preserving replacement (I think this is what Urmas wants) ie - in this case retaining the case of the initial letter, your example would be captured:

"Esssen" -> "Essen" and "esssen" to "essen"

but in a single rule =) so sounds like you're on-side; but then you give a number of other rules where replacing the case is an important part of the correction:

"THis" -> "This" 

or whatever =) where retaining the upper-case of the first two letters would just kill the point here - is that understanding correct ? or put another way:

"FOo" -> "BAa" is wrong but "FOo" -> "Baa" is right etc.

Sadly I'm no expert here =) forgive my rambling if I'm confused.
Comment 17 sophie 2014-02-21 10:53:17 UTC
Created attachment 94501 [details]
screenshot of the dialog showing the two possibilities of bar and Bar

This screenshot shoes the entries in the exception word book. Now when you enter 'bar' in your text, the suggestion list will show 'foo', when you enter 'Bar' the suggestion list will show 'Foo'.
So how do you reproduce:
"It will offer 'bar' for 'foo', but not 'Bar' for 'Foo', which is the bug."
Please add a precise description of the bug you encounter so we can confirm it. Thanks Sophie
Comment 18 Florian Reisinger 2014-02-21 16:08:50 UTC
Hi Michael,

That's why I suggested regular expressions...
In the initial report, you want [Ff]oo -> bar
What I wanted to show you is: This does not only work with regular expressions, but with multiple rules.

I just wanted to point out the various needs of different people. If we want the first letter automatically changed to UPPER and LOWER -case, the easiest way might be Regular expressions. (As these can be used for more as well)

So coming back to #13. Turning that on automatically will break A LOT of things. Implementing RegEx is better.... (See above for a example to solve the problem from #0)

I hope you are able to get my point now, if not I am very sorry and I will try it again ;)
Comment 19 Commit Notification 2014-11-03 11:13:37 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":


fdo#61167 suggest titlecase and uppercase words from exception dict

It will be available in 4.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Comment 20 Andras Timar 2014-11-03 11:34:29 UTC
The fix above addressed the original bug report, i.e. if the exception dictionary has the word pair in lower case, then we will get upper case or title case replacement suggestion in Writer for the upper case or title case versions of the prohibited word.

Urmas, if you think that it is an acceptable fix, please close this bug.
Comment 21 Adolfo Jayme Barrientos 2014-11-03 16:30:52 UTC
I went ahead and closed it, this is not “Urmas’ report” as they said, and won’t expect that person to even give a polite reply.