in reply to Automatic verb inflection script
I assume you want all of the variables to be initialized with $verb. Howevr, this statement only sets $present_1 and the rest will be set to undef.my ($present_1,$present_2,$present_3,$present_4,$present_5) = $verb;
A quick fix is to write:
my ($present_1, ...) = ($verb) x 5;
Another approach to this would be to first compute the verb stem and then just add the appropriate ending:
For your group 1 verbs, this can be very compactly written:my $stem = $verb; $stem =~ s/er$//; my $present_1 = $stem . "e"; my $present_2 = $stem . "es"; ...
In fact, you might be able to make use of the module Lingua::Stem::Fr.my @present_endings = qw(e es ons ez ent); my @present = map { $stem . $_ } @present_endings; ...etc for the other tenses...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Automatic verb inflection script
by gojippo (Novice) on May 20, 2008 at 03:53 UTC |