Issue 13981 - Affix file control over capitalisation
Summary: Affix file control over capitalisation
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: spell checking (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: issues@lingucomponent
QA Contact: issues@lingucomponent
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-01 02:37 UTC by tristanb
Modified: 2013-02-24 20:43 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description tristanb 2003-05-01 02:37:16 UTC
This is sort of related to:
http://www.openoffice.org/project/www/issues/show_bug.cgi?id=12174

It concerns how lower->Title or lower->CAPS, but Title-/>CAPS
key: -> = goes to,     -/> = doesn't go to

Would it be possible to create keywords in the affix file that allowed or 
disallowed a particular spell check promotion?

e.g.
PROMOTE LOWERTOUPPER 1
PROMOTE TITLETOUPPER 0
PROMOTE UPPERTOLOWER 0

the values given would override the default (current) settings, so an affix 
file without this information would behave the same as now.

This would save the addition of BANNER copies of Propernoun words, and also 
allows more specialised dictionaries to disallow promotion to Title (e.g. 
paracetamol could be stopped from being spelled Paracetamol)

I'm just giving this idea as a consideration, it's open for comments from 
anyone :)
Comment 1 khendricks 2003-05-01 15:09:00 UTC
Hi,

Interesting but I am not sure I agree.  I think I would rather allow 
auto promotions of initial caps to all caps on the ground that any 
word can be used in a banner.

Also can you explain why:

> more specialised dictionaries to disallow promotion to Title (e.g. 
> paracetamol could be stopped from being spelled Paracetamol)

Are you saying that "paracetamol" could never occur in the title of 
a paper or as the first word in a sentence?  I did not know it was 
possible to rule out any English word from being capitalized 
under those rules.

Please explain under what rules an English word is not allowed 
to have an initial capital letter if it occurs at the beginning of 
a sentence or as a lead word in a mutli-line title.

Thanks,

Kevin
Comment 2 tristanb 2003-05-02 00:49:49 UTC
I got the paracetomol example from a FAQ about a medical dictionary. 
Paracetamol can be capitilised at the beginning of a sentence, but 
this can be ignored by the user when proofing. When incorrectly 
capitilised within a sentence, Paracetamol is more likely to be 
missed if it's not flagged.

Probably a better example would be a dictionary of biological 
species, (e.g. Canis lupus or Staphylococcus aureus) where the 
species should always be lowercase.

I'm not saying that this is a common need, (or whether anyone will 
use the feature) :) and I wouldn't want the affix files to become a 
complex mix of obscure keywords, but it does give more control and 
flexibility to the dictionary designer.
Comment 3 tristanb 2003-05-03 03:16:01 UTC
...sorry about that aweful typo: capitAlisation :)

Alternatively, instead of global 'case-promotion' keywords for the 
dictionary, it could be word based (using an affix-type id).

So for 'Staph aureus', the dictionary would have aureus/Z
Z would contain the possible caps promotions (i.e. not to Aureus)

I'm not sure how badly doing this would affect the speed.
Comment 4 khendricks 2003-05-25 14:36:29 UTC
Hi, 
 
I am changing this to "started" but I am still not dure of the correct solution. 
This wold be something for OOo 2 in any case. 
 
Thanks, 
 
Kevin 
 
Comment 5 khendricks 2003-08-29 16:30:35 UTC
Hi,

Changing this from "feature" to "enhancement" and one that I will targer for the OOo 
1.1.X series after examing/rewriting how capitalization is handled in MyS[pell to try 
and simplify and improve this.

Kevin
Comment 6 nemeth.lacko 2007-07-17 14:09:39 UTC
Hunspell can control capitalization by KEEPCASE and FORBIDDENWORD affix parameters.

Orthographical or typigraphical rules of most western languages forbid all form
of capitalization of some words, especially measurements or currencies. (FOR
EXAMPLE: km AND GHz ARE UNITS OF MEASUREMENT.) Use KEEPCASE here:

== aff ==
KEEPCASE x
== dic ==
2
km/x
GHz/x
== test ==
km is Ok.
GHz is Ok.
Km -> km
KM -> km
GHZ -> GHz

To forbid only capitalized forms (genus in scientific name, capitalization of
special letters, like IJ in Dutch) use FORBIDDENWORD flag on capitalized
dictionary words:

== aff ==
FORBIDDENWORD x
== dic ==
ijs
IJs
Ijs/x
aureus
Aureus/x
== test ==
ijs is Ok.
IJs is Ok.
Ijs -> ijs, IJs
IJS is Ok.
aureus is Ok.
Aureus -> aureus
AUREUS is Ok.
Comment 7 nemeth.lacko 2007-07-17 14:12:10 UTC
Verified (see Hunspell test data tests/keepcase.* and tests/IJ.*)
Comment 8 nemeth.lacko 2007-07-17 14:13:38 UTC
.