Apache OpenOffice (AOO) Bugzilla – Issue 67500
WILDCARDS in Writer Replacement List
Last modified: 2013-08-07 14:38:26 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 http://www.openoffice.org/issues/show_bug.cgi?id=4579 : 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)
Reassigned to SBA.
SBA: Confirmed. Set subcomponent to "editing" as this is the "situation" where the benefit would be. Reassigned to requirements.
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)
[QUOTE] this is a very rare usecase [/QUOTE] I CANNOT agree with this. ALL LATIN LANGUAGES MODIFY THE SUFIX OF THE WORD, 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 MOST LANGUAGES are NOT.
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 WRITER IS USED OF COURSE FOR WRITING). 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. CORRECTION TO MY LAST POST ========================== 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. SUMMARY ======= 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) GERMAN 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). VERBS ===== 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 tense) - 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 http://en.wikipedia.org/wiki/Intransitive_verbs for more details), which is quite complex in various languages. WILDCARDS IN ENGLISH ===================== 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/ adverbs. 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.)
> 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.
just set a default target milestone
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.
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.