Glossaire_XH

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Glossaire_XH

Post by cmb » Sun Aug 21, 2016 12:57 pm

Tata wrote:
ludoam wrote:@Tata
this is not an easy task (https://fr.wikipedia.org/wiki/D%C3%A9cl ... n_slovaque) :o
That's really not. There are even to many exeptions , so it seems sometime as if there are no standard rules :-).
Also for other languages. Even English, which appears to be very simple with regard to plural, has several exceptions to the "append an 's' rule", e.g. mouse → mice, die → dice, fox → foxes, city → cities. See http://www.usingenglish.com/weblog/archives/000347.html.

It might be worth considering to use an existing library for the pluralization (if there is one that is maintained).
Christoph M. Becker – Plugins for CMSimple_XH

oldnema
Posts: 265
Joined: Wed Jan 21, 2009 5:15 pm
Location: Czech Republic
Contact:

Re: Glossaire_XH

Post by oldnema » Sun Aug 21, 2016 5:07 pm

Hi Ludovic,
I have just made CZECH LANG TRANSLATION
Josef
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates

ludoam
Posts: 18
Joined: Wed Jul 20, 2016 7:05 pm

Re: Glossaire_XH

Post by ludoam » Sun Aug 21, 2016 8:05 pm

oldnema wrote:Hi Ludovic,
I have just made CZECH LANG TRANSLATION
Josef
Hi Josef,
I use your excellent template ;)
Thank you for this translation. I will add to the next version as soon as I made the plural detection for this langage.

@Tata
Little question regarding slovak plural :
The first difficulty is the number of possible forms of a word (Nominative, genitive, dative, accusative, locative, instrumental), knowing that each case has its own plural.

If I ask the user to create his word in its basic form (nominative), is it understandable?

so if he created the word chlap, for example:
The plural detector found the missing five forms (chlapa, chlapovi, chlapa, chlapovi, chlapom) and all plurals (chlapi, chlapov, chlapom, chlapov, chlapoch, chlapmi).
(Here, some are the same but it's always nine way to write a word ;-)

This is the only way for me to do something not too complicated. Because search any case for finding all the other case and plural would be much more complex.

Ludovic
Glossaire_XH is no longer available.

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Glossaire_XH

Post by Tata » Sun Aug 21, 2016 10:08 pm

Yes. In Slovak glossaries the nouns are almost standardly written in singular nominative nominative.
If there would a text, e.g.:
CMSimple_XH podporuje túto stránku.
which means
CMSimple_XH supports this page (and the noun "túto stránku" = this page is here in accusative)
The word page in Glossair can be written as "táto stránka" = this page (nominative).

I basically think that all words and in all languages should be always written in nominative (singular or plural). That's standard in all dictionaries, encyclopedies, vocabularies etc.
This - however - would require different approach of the plugin in terms of word recognition. Especially in longer texts where the words may occure eventually in all their forms.
Or, there shall be really a recommendation in HELP that if a word has more forms (various forms in its declination), only the exact form defined in Glosair will be recognized. So, if required to respect other occuring forms, they shall be defiend separately (or the plugin shall allow writing more /all possible forms in an array). So the plugin would recognize "chlap, chlapa, chlapovi, chlapi, chlapov, chlapom, chlapoch, chlapmi" for the word chlap = man.

In Slovak, there is a principle that words have their core part which mostly keeps its form.
E.g.
nominativ: to je chlap (this is a man) - to sú chlapi (these are the men) - Q: WHO/WHAT
genitiv: pýtam sa chlapa (I ask the man) - pýtam sa chlapov (I ask the men) Q: FROM WHO/FROM WHAT
dativ: dám to chlapovi (I give it to this man) - dám to chlapom (I give it to the men) Q: TO WHOM/TO WHAT
accusativ: vidím chlapa (I see a man) - vidím chlapov (I see the men) - Q: WHOM/WHAT I SEE
local: o chlapovi (about a man) - o chlapoch (about the men) - Q: ABOUT WHOM/ABOUT WHAT
instrumental: s chlapom (with a man) - s chlapmi (with the men) - Q: WITH WHOM/ABOUT WHAT

but there is also a word "chlapov" which is not noun but adjective and it means belonging to a man (chlapov otec = man's father)
another example:
pes = dog
psi or psy = dogs
psi in case: The men fought like dogs.
psy in case: There were two dogs on the street.

dub = oak
the table is made of oak can use a form "stôl je vyrobený z duba or z dubu

there would be hundreds of examples how complicated is our language.

So frankly, it is difficult to simplify it. I just can't imagine how to link a word used in text in some declination form with a word in glossary written in its initial form (nominativ sing. or plural).
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

ludoam
Posts: 18
Joined: Wed Jul 20, 2016 7:05 pm

Re: Glossaire_XH

Post by ludoam » Mon Aug 22, 2016 8:40 am

Tata wrote:Yes. In Slovak glossaries the nouns are almost standardly written in singular nominative nominative.
...
thank you Tata for the detailed answer. I will continue to explore this approach.

I'll try to explain in English my method:
in French, we wrote a horse "un cheval" (singular), horses, "des chevaux" (plural).
Regex search:
`(al)\b`
and replace by:
'($1|aux|aus|als)'
result for the regex used to search words:
chev(al|aux|aus|als)

It also cover the specials case like ("un carnaval", "des carnavals").

That is the principle.

This can become complicated with the accumulation of rules, for example in Danish:
ansvar => (a|ø|æ)nsv(ar|arr|rar|art)(e|er|et|ne|ene|erne)?

For Slovak, it is even worse:
chlap => chlap((a)?(mi)?|e|(i|í)(a|ach|am)?|o(ch|m|u|v(i)?(a)?)?|u|y)?
but it finds chlap, chlapi, chlapa, chlapov, chlapovi, chlapom, chlapoch, chlapmi

A word ending in a vowel:
hrdina => hrdin(a)?(y|u|e|o(ch|m|u|v|vi|via)?|(ho|m|mu)|(i)?(á|a)?(ch|m|mi)?|a(t|t)(a(m|mi)?|á(ch)?|om|u|i)?|en(iec|cami|ce|com)?)?
finds hrdina, hrdinovia, hrdinu, hrdinov, hrdinovi, hrdinom, hrdinoch, hrdinmi

because it must cover all cases ending in a vowel (feminine, neutral, foreign words etc ...) in all forms and all plurals.

And I have not yet integrated the cases of missing vowels (chlieb => chleba) or the mutations (c, k => s, c).
But the tests are successful this time.
Tata wrote: but there is also a word "chlapov" which is not noun but adjective and it means belonging to a man (chlapov otec = man's father)
There are indeed cases untreatable when a word can have several meanings depending on the context of its use.

Besides, it is not unique in the plural. But in the context of a technical article or concerning a sport or an activity requiring to define certain words and special terms (for purposes of explanation to the novices for example), I do not think this case will often encountered.

The more you automate something, the more you are exposed to particular cases :lol:

I am on holiday soon, that's good :)
regards,
Ludovic
Glossaire_XH is no longer available.

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Glossaire_XH

Post by Tata » Mon Aug 22, 2016 4:35 pm

I have considered all possible aspects and came to this point:
1. The words (Titles) chosen for Glossair shall be written exact in the form used on a page. It means in their eventual declination form (in languages using these modiffication)
2. In description then the words shall be used in their basic form:
E.g.:

All webpages based on CMSimple_XH are simply editable.
WEBPAGES
Webpage - Description of the word webpage...

EDITABLE
Edit - Description of the word edit...

I can imagine a semi-solution: Make it possible to assign a description to more forms of the same word. This would require to add uniq ref-number to the words and later use the ref-number for another marked form of the same word.
E.g.:
Ten chlap je starý. Od takého chlapa sa veľa naučíš. Takému chlapovi môžeš veriť. Opýtaj sa toho chlapa. Čo vieš o tom chlapovi? Stretol si sa už s takým chlapom? ...
(This man is old. You may learn a lot from such man. You may trust such man. Ask the man. What do you know about the man? Have you meet such man already?...)

Code: Select all

Ten <span rn="1" class="glossair-word"><a...>chlap</a></span> je starý. Od takého <span rn="1" class="glossair-word"><a...>chlapa</a></span> sa veľa naučíš. Takému <span rn="1" class="glossair-word"><a...>chlapovi</a></span> môžeš veriť. Opýtaj sa toho <span rn="1" class="glossair-word"><a...>chlapa</a></span>. Čo vieš o tom <span rn="1" class="glossair-word"><a...>chlapovi</span>? Stretol si sa už s takým <span rn="1" class="glossair-word"><a...>chlapom</span>? ...
I hope the explanation is clear. It will require a lot of clicking and high concentration. But writing glossaries is also no sandbox playing.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

ludoam
Posts: 18
Joined: Wed Jul 20, 2016 7:05 pm

Re: Glossaire_XH

Post by ludoam » Mon Aug 22, 2016 6:10 pm

@Tata:
That seems clear.
Nevertheless, I try to do something simple for the user.

He created a word, the title of the definition (or not), the definition, that's all.
If he wants to create a word in the form he desires, the plugin will detect it in the article, no worries.

If he agree to create a word always in its basic form, then he can hope that the word will also be underlined in the article if it is in another form or plural (in the case of languages ​​that differentiate the spelling of various forms). But the definition that will be displayed will always be that of the basic word, of course.

The user can also bypass some special cases not detected by creating a second word (in a different form in the plural, for example) and copy / paste the definition of existing basic word. He will then have the same word in two different forms in the list, that's all.

Finally, the original purpose of the plugin is to display a definition of a technical term, a little-known word etc ... and eventually detect its plural. All other detections (conjugations, adjectives etc ...) are not provided.

That said, I realize that some languages are easier to plan than the other :)

regards,
Ludovic
Glossaire_XH is no longer available.

mhz
Posts: 676
Joined: Tue Jun 25, 2013 8:46 pm
Location: Heusenstamm, Hessen
Contact:

Re: Glossaire_XH

Post by mhz » Mon Aug 22, 2016 10:47 pm

Which purpose has the link words in words and definitions?
It is underlined, it seems to be a link, but nothing happens at a click on it.
Michael Zajusch (mhz)-- Mein Tutorial für CMSimple_XH. Früher

ludoam
Posts: 18
Joined: Wed Jul 20, 2016 7:05 pm

Re: Glossaire_XH

Post by ludoam » Tue Aug 23, 2016 5:45 am

mhz wrote:Which purpose has the link words in words and definitions?
It is underlined, it seems to be a link, but nothing happens at a click on it.
This is to sort the column. The list can also be sorted by clicking on "Id" (this is explained in the help).
Glossaire_XH is no longer available.

mhz
Posts: 676
Joined: Tue Jun 25, 2013 8:46 pm
Location: Heusenstamm, Hessen
Contact:

Re: Glossaire_XH

Post by mhz » Tue Aug 23, 2016 7:43 am

Thanks.
Now I found out, how this works.
Michael Zajusch (mhz)-- Mein Tutorial für CMSimple_XH. Früher

Post Reply