Issue 67500 - WILDCARDS in Writer Replacement List
Summary: WILDCARDS in Writer Replacement List
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.0.3
Hardware: All All
: P3 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
Depends on:
Reported: 2006-07-18 13:15 UTC by discoleo
Modified: 2013-08-07 14:38 UTC (History)
3 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description discoleo 2006-07-18 13:15:02 UTC
Wildcards in Replacement List

One of the most useful features in OOo Writer is the replacement list. I rely
heavily on it and it greatly simplifies the writing of many documents.

However, there are some situations, where I need something more advanced.

To better understand my request, I will start with a common word in my
replacement list:
sx => susceptibil (English susceptible, I use it often when describing bacterial
susceptibilities to antibiotics)

While in English there is only one form, in many Latin languages (like Romanian,
but also Italian, French and many more), adjectives and nouns unfortunately must
conjugate depending on gender and number. Therefore at least 4 (2x2) forms exist
for any adjective (actually even more forms do exist and even nouns will be
conjugated in a complex fashion).

Lets look at the previous example:
m, singular: susceptibil
f, singular: susceptibila
m, plural: susceptibili
f, plural: susceptibile
(other forms are: susceptibilul, susceptibilii, susceptibilele)

It would be completely irrational to have (at least) 4 entries in the
replacement list for the same word. And it becomes even more impractical to
remember the shortcuts for all those entries.

My first impression was, why shouldn't I simply write 'sx' followed by all those
different endings and have the 'sx' inside e.g. 'sxa' or 'sxi' be automatically
expanded to 'susceptibil'. The problem is that only a word-delimited 'sx' will
be expanded.

Here is a wise solution to this problem: use wildcards!

In the foregoing example this would have looked like:
sx[aeilu]* => 'susceptibil\1' (where '\1' means to automatically append any
characters written after 'sx', but this could be implicit, without explicitly
writing the '\1' identifier);

The advantages are obvious, only one item is in the replacement list (list is
much shorter now) and there is only one shortcut to remember.

Why use wildcards and do not replace any occurrence of 'sx'?
Well, some words may contain the shortcut and we wouldn't like to expand that,
too. To illustrate this for 'sx': I also use 'sxt' as a shortcut for one
antibiotic (Cotrimoxazole = Trimethoprime + Sulfamethoxazole, classically
written as SXT). Another example would be:
rz => rezistent (English resistant)
rz[aei]* =>  'rezistent\1' , however Tarzan does contain an 'rz', too. (Well, I
do not often write the word Tarzan, but for the sake of perfection, I do prefer
the wildcards method.)

IF it takes more time to implement this feature, I would agree also with the
non-wildcard method to replace any occurrence of the shortcut. Alternatively,
define 2 types of replacement lists: one for replacements of every occurrence,
and one for replacements of only word-delimited shortcuts.

An added benefit of this feature is an elegant workaround for bug : instead of defining
keyboard shortcuts for special characters, we define shortcuts in the
replacement list.
.*tz.* => '\1Å£\2'
.*a>.* => '\1ă\2'
and so on. (.* means any character) This would be equally effective to any
method based on keyboard shortcuts.

To further illustrate the usefulness of wildcards, I end with another example,
this time with a noun:
(English: diagnosis)
singular: diagnostic, diagnosticul
plural: diagnostice,  diagnosticele
replacement list: dx[elu]* => diagnostic\1
(the first form of the noun is as for 'the'+'noun', and the second form is a
special form in Romanian, something like when 'the' has been removed from the
beginning and appended to the noun itself)
Comment 1 michael.ruess 2006-07-18 14:27:23 UTC
Reassigned to SBA.
Comment 2 stefan.baltzer 2006-07-20 13:45:01 UTC
SBA: Confirmed. 
Set subcomponent to "editing" as this is the "situation" where the benefit would be.
Reassigned to requirements.
Comment 3 lohmaier 2006-07-25 00:20:01 UTC
IMHO very unlikely to be implemented at all (unless someone provides a patch)
since this is a very rare usecase - almost nobody else would have a use for that.
Even if people would like to use that, it is limited to a very small subset of
available languages - only a few actually only modify the suffix of a word to
make-up different forms of a word.

Furthermore this kind of stuff is more suitable to be implemented in an input
method (writing one for e.g. gtk or scim/m17n is not that hard - probably easier
than implementing that in OOo)
Comment 4 discoleo 2006-07-26 14:01:56 UTC
[QUOTE] this is a very rare usecase [/QUOTE]

I CANNOT agree with this.


i.e. French, Italian, Spanish, Portuges, Romanian !!!
(While adjectives are unmodified) Nouns are modified in German, too.

And verbs get modified, too, in all Latin languages, including German and some
20 other languages (Serbo-Croatian, Russian, Czech, Polish, Finnish, Hungarian -
very complex, and other). Admittedly, English (and Japanese) are simpler, BUT
Comment 5 discoleo 2006-08-06 19:49:07 UTC
The single most important feature in OOo Writer is the replacement list. Non of
the other features helps me so much and eases my work as this one. Indeed, while
most special features are useful only to a limited number of people and only
sometimes, I use the replacemnt list every time I write something (AND THE

It is strange how little the office software has evolved in all these years. The
most consistent feature that would ease working would be to enhance the writing
speed and shortcuts are to date the only thing to do this.

I will therefore defend my point again. Shortcuts will greatly enhance the
writing speed and IF SOMEONE DOES NOT USE THEM, he should be encouraged to try
it. They really offer speed, ALL THE TIME.

When I mentioned that adjectives do NOT change in German, I meant they do not
change based on gender (m/f/n), BUT THEY DO change in plural, e.g.:

resistent (engl. resistant)
sg. der resistente Keim (the resistant microbe)
pl. die resistenten Keime

Therefore, in the German language, both the adjectives and the nouns do change
in plural.

I will shortly describe the grammatical changes in various languages:

LATIN LANGUAGES (French, Romanian, Italian, Spanish, ...)
  nouns: singular vs plural (some other forms exist in various languages)
    in Romanian: the+'noun', as well as a special form: 'noun'+the
    e.g. (un) microb (a microbe), microbul (microbe-the)
  adjectives: gender and number (some other forms exist, too)
  verbs: gender and number, multiple tenses, very complex conjugation

SLAVIC LANGUAGES (Serbo-Croation, Russian, other)
  nouns: singular vs plural, and subject vs non-subject
    e.g. sg. subject: 'pjesma' je ljepa (pjesma (Serbo-Croatian) = song)
         sg. complement: ti pevas 'pjesmu'
         pl. subject: 'pjesme' su ljepe (complement identical in pl)
  adjectives: gender, number
  verbs: gender, number, a number of tenses (less than in latin, but still
enough; in Russian there are special froms for transitive vs intransitive)

  nouns: only number
  adjectives: number
  verbs: gender, number and multiple tenses
(English is a germanic language, too, but its grammatic is far more easier.)

I know that Hungarian grammatic is awful, but I do not speak hungarian,
therefore I cannot reliably describe what conjugates when (but I understand that
everything conjugates in a very complex fashion). This is mostly true of
Finnish, too.

I hope that this will encourage the developers to try to implement wildcards (or
as a minimal feature, a second replacement list, where any occurence is
replaced, even if inside a word).

A last note is pertinent. I have not mentioned verbs in my first post. Indeed, I
do not have any shortcuts for verbs:
 - most verbs are short (except technical verbs, BUT see later)
 - most languages have very complex conjugation for verbs (6+ forms for present
 - therefore I would need at least 6 shortcuts for basic verb conjugation and
this is completely impractical (in english are only 2 forms, but there are still
different tenses)

Without wildcards, verb shortucts are completely impossible (even in English).
Another problem of verbs is their different morphology based on transitive vs
intransitive use (see for more
details), which is quite complex in various languages.

Even when writing english text, I would benefit from wildcards in my shortcut
list. One use would be for verbs (he/she/it vs all other forms and different
tenses). But there are other words like nouns derived from verbs or adjectives/
nouns, where I would like to have only one shortcut. This is particularly true
for technical terms, where one uses them both as nouns, verbs or adjectives/

a pertinent example:
 process, processes, processed, processor, processors, processing

Instead of writing process, consider using only px, and you will write many
IT-texts a little bit faster (at least if there are wildcards implemented).
(This is even faster then the minimum 3 letters needed for word suggestion, and
if you had 'procedure' into your suggestion list, you wouldn't benefit from that
list at all, because of course, 'procedure' is ranked higher than 'process',
i.e. it comes first.)
Comment 6 lohmaier 2006-08-07 00:12:07 UTC
> They really offer speed, ALL THE TIME.

So why do you want every single application to support it instead of writing a
suitable input method that offers it in *every* Application with a one-time effort?

Again: I guess the percentage of users who would actually use this feature is
*way* below 10% - so don't expect OOo to have this feature in the near future...

PS: WRITING ALL CAPS is considered shouting and kind of impolite - you should
try to avoid that.
Comment 7 jack.warchold 2006-08-10 16:06:15 UTC
just set a default target milestone
Comment 8 stefan.baltzer 2006-08-21 11:42:02 UTC
SBA: We won't get much further with a "few people's discussion" about "This is
needed desperately by half the world" vs. "Nobody will be willing to learn and
use it"... :-)

There are already a lot of requirements/ideas/feature and enhancement wishes
"piled up" that one more will not change much.

When there is a OOo community developer willing to provide a patch that adresses
this, he may well go ahead. And if not.... nothing will happen to this one. And
this one, too, will get old and older. Because there is "bigger fish to catch"
in the foreseeable future.

This is the important thing. So do not waste your time arguing (because you are
thinking that YOU know what "The world" nedds and needs not). The "strait" is
the availability of developers who indeed do work slower than other people dream
and wish... :-(

Reassigned to requirements.
Comment 9 e_psi 2008-07-23 12:54:35 UTC
in addition it should be possible to replace Text without a leading <space> 
under certain conditions, e.g. special leading Characters / or \ or using HTML-
like Syntax &longarrow;
this is especially useful to enter different Spaces like in 25&smallspace;cm or 
combining diacritics etc.