PERL:


PERL: - . 94


sub noun_plural { local $_ = shift; # !

s/ss$/sses/ 11

s/([psc]h)$/${1}es/ ||

s/z$/zes/ 11

s/ff/$/ffs/ 11

s/f$/ves/ ||

s/ey$/eys/ 11

s/y$/ies/ 11

s/ix$/ices/ ||

s/([sx])$/$1es/ ||

s/$/s/ I|

die "can't get here"; return $_;

verb_singular = \&noun_plural; #

. , , Lingua:EN::Inflect CPAN.

use Lingua::EN::Inflect qw(PL classical);
classical(1); # ?

while (<DATA>) { # for (split) { # print "One $_, two", PL($_), ",\n";


2.19. : 蠠 91

#

$_ = 'secretary general';

print "One $_, two ", PL($_), ".\n";

__END__ fish fly ox species genus jockey index matrix mythos phenomenon formula

:

One fish, two fish.

One fly, two flies.

One ox, two oxen.

One species, two species.

One genus, two genera.

One phylum, two phyla.

One cherub, two cherubim.

One radius, two radii.

One jockey, two jockeys.

One index, two indices.

One matrix, two matrices.

One mythos, two mythoi.

One phenomenon, two phenomena.

One formula, two formulae.

One secretary general, two secretaries general.

. , , ­ , an ­ .