in reply to Re: Implication is not enough
in thread Implication is not enough
That way, you stil have *only* implication but changed
the precedence of some steps (badly). Look:
If the word you get to test would be "Ägypterinen", you
never would come to the guts of if($word =~ /en$/)
Ok. Where am I going with this? Well - theres no correct
or complete morphological parser of the german language as
of today. I could write one, but I would like to write it
elegantly. Seems I´m missing a feature in Perl. Or just
some decent way to craft code that can potentially both
analyze and generate.
The task is easy. Given 3 german words. Ägypter, Ägypterin, Ägypterinen Write a routine that takes a list of 3 Arguments: word, genus, numerus. and returns a list of 3 elements: word, genus, numerus where "word" is the word that was given to the routine after applying genus and numerus to it. genus and numerus are the genus and numerus the word HAD BEFORE applying the new genus and numerus to it.Like so:
The TRY_RULE part is it. I just want to apply rulessub mystical_de_morphology_ruleprocessor { my $word = shift; my $new_genus = shift; my $new_numerus = shift; TRY_RULE1: (word (m,sg) <-> word + "in" (f, sg)) TRY_RULE2: (word (f,sg) <-> word + "en" (f,pl)) return newword, old_gen, old_num; }
Ciao
|
---|