Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Implication is not enough

by PetaMem (Priest)
on Jul 30, 2001 at 17:21 UTC ( [id://100853]=note: print w/replies, xml ) Need Help??


in reply to Re: Implication is not enough
in thread Implication is not enough

Hi,

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:
sub 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; }
The TRY_RULE part is it. I just want to apply rules
2 rules = 4 IFs, 3 rules = 8 IFs, 10 rules = forget it.
Prolog would be nice, but I want stick with perl for that.

Ciao

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100853]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-03-29 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found