BioGeek has asked for the wisdom of the Perl Monks concerning the following question:
Hi Perlmonks,
I'm in the proces of translating a site into Dutch. Users can subscribe to the site, and choose a username. At several places I have to form possessives with the username, like "Richard's library".
Unfortunatly, the grammar rules in Dutch are quite complex, and depend on the endsound of the word
Rules for forming possessive forms of words in Dutch
Ground Rule:Write the s directly connected to the word -
Richard - Richards bibliotheek (= Richard's library)
Exceptions
- words ending with an unstressed (long) vowel: use apostrophe
- Evi - Evi's bibliotheek
- Manu - Manu's bibliotheek
- Lea - Lea's bibliotheek
- Bo - Bo's bibliotheek
- words ending with the letter y: only use apostrophe when the y is preceded by a consonant
- Willy - Willy's bibliotheek
- Ray - Rays bibliotheek
- words ending with a mute e: no apostrophe
- Unstressed (long) sound written with two letters or with an accent: no apostrophe
- André - Andrés bibliotheek
- Geertrui - Geertruis bibliotheek
- words ending on a sis-sound (-s, -z, -sj, -ch, -x): use apostrophe
- Tegenbos - Tegenbos' bibliotheek
but:
- Dutroux - Dutrouxs bibliotheek
(doesn't end with a sis-sound!! - Oh, the joys of Dutch grammar ;-)
Now are there any regexes or modules I can use to know whether a vowel is stressed or unstressed, or whether the last letter "e" in a word is mute or not?
Re: Possessive forms in Dutch.
by Cody Pendant (Prior) on Jan 31, 2005 at 02:38 UTC
|
Every time someone subscribes and is potentially in one of the exception cases, have it add a record to a "people needing their possessives checked" database. Use a default of "s" or whatever's the most common in the meantime, then when you have a few moments to spare, view and tweak the ones which need tweaking.
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
=~y~b-v~a-z~s; print
| [reply] |
|
You could also jumpstart it by finding a list of the thousand or so most common Dutch names and paying some poor student a few guilders to make them possessive.
| [reply] |
|
paying some poor student a few guilders The fellow would be quite upset to be remunerated in worthless money... ;)
| [reply] |
|
| [reply] |
Re: Possessive forms in Dutch.
by Old_Gray_Bear (Bishop) on Jan 30, 2005 at 23:32 UTC
|
Sorry, I can't directly point you to a CPAN module, but have you considered ducking the issue by revising the text slightly? Translate "Richard's Library" into "The Library" (under the Heading "Richard") or "The Library of Richard".
----
I Go Back to Sleep, Now.
OGB
| [reply] |
|
I can do that in some places, but not all of them. I'm not the siteowner, and so somewhat bound to the framework made by someone else. This framework was previously used to translate the site in Russian, Norwegian and French, so if I mess to much with the framework, I migth end up breaking the other-language versions of the site.
| [reply] |
|
I agree with the idea that it would be better to have a different structure, such as Dave :: Library :: Fiction or somesuch. That's much more portable across languages - and unless you're quite sure that the Russian, Norwegian and French translators did a perfect job then the site owner may well be interested in rethinking his/her posessives.
If you absolutely positively have to keep Willem's Library and so on, you might want to store the posessive form in your database and only change it when the name changes. My guess is that you'll have a monster bit of code - if a very wise monk steps forth maybe a monster regexp - and you may not want to run it too often.
I'm not an expert in these things but you might also want to look into lexemes/morphemes, though I honestly have no idea how applicable they are to proper names.
Good luck! It's an interesting challenge, and I hope you're being paid by the hour :-)
| [reply] |
Re: Possessive forms in Dutch.
by pijll (Beadle) on Jan 31, 2005 at 11:53 UTC
|
if ($name =~ /[^aeiou][aiouy]$/) {
$possessive = $name . "'s";
} elsif ($name =~ /(s|z|x|sj|sch)$/) {
$possessive = $name . "'";
} else }
$possessive = $name . "s";
}
should work for all Dutch (native) names. You can't do thing correctly for foreign names (such as Dutroux), as they are not spelled according to Dutch rules. | [reply] [d/l] |
Re: Possessive forms in Dutch.
by Anonymous Monk on Jan 31, 2005 at 09:31 UTC
|
Just use the ground rule. Always. Complain it's otherwise too difficult for the children to learn. Then, in a few years time, a spellings reform will say putting an s behind the word is ok. (Except for names that are derived from plants or animals, or some other silly exception).
<rant>Dutch spelling reforms are great. It makes that the longer ago an author wrote his book, the harder it is to read. And hence, Dutch people don't quote Vondel like the British do with Shakespeare. (In fact, for Dutch people, it's easier to read Shakespeare than Vondel)</rant> | [reply] |
|
|