App-reposdb
view release on metacpan or search on metacpan
script/_reposdb-inline view on Meta::CPAN
#workmen workman
#yachtsmen yachtsman
#yeomen yeoman
#/);
#
## Words ending in ves need care, since the ves may become "f" or "fe".
#
## References:
## http://www.macmillandictionary.com/thesaurus-category/british/Irregular-plurals
#
#my %ves = (qw/
# calves calf
# dwarves dwarf
# elves elf
# halves half
# knives knife
# leaves leaf
# lives life
# loaves loaf
# scarves scarf
# sheaves sheaf
# shelves shelf
# wharves wharf
# wives wife
# wolves wolf
#/);
#
## A dictionary of plurals.
#
#my %plural = (
# # Words ending in "us" which are plural, in contrast to words like
# # "citrus" or "bogus".
# 'menus' => 'menu',
# 'buses' => 'bus',
# %ves,
# %irregular,
#);
#
## A store of words which are the same in both singular and plural.
#
#my @no_change = qw/
# deer
# ides
# fish
# means
# offspring
# series
# sheep
# species
# /;
#
#@plural{@no_change} = @no_change;
#
## A store of words which look like plurals but are not.
#
## References:
#
## http://wiki.answers.com/Q/What_are_some_examples_of_singular_nouns_ending_in_S
## http://virtuallinguist.typepad.com/the_virtual_linguist/2009/10/singular-nouns-ending-in-s.html
#
#my @not_plural = (qw/
#Aries
#Charles
#Gonzales
#Hades
#Hercules
#Hermes
#Holmes
#Hughes
#Ives
#Jacques
#James
#Keyes
#Mercedes
#Naples
#Oates
#Raines
#Texas
#athletics
#bogus
#bus
#cactus
#cannabis
#caries
#chaos
#citrus
#clothes
#corps
#corpus
#devious
#dias
#facies
#famous
#hippopotamus
#homunculus
#iris
#lens
#mathematics
#metaphysics
#metropolis
#mews
#minus
#miscellaneous
#molasses
#mrs
#narcissus
#news
#octopus
#ourselves
#papyrus
#perhaps
#physics
#platypus
#plus
#previous
#pus
#rabies
#scabies
#sometimes
#stylus
#themselves
#this
#thus
#various
#yes
#nucleus
#synchronous
#/);
#
#my %not_plural;
#
#@not_plural{@not_plural} = (1) x @not_plural;
#
## A store of words which end in "oe" and whose plural ends in "oes".
#
## References
## http://www.scrabblefinder.com/ends-with/oe/
#
## Also used
#
## perl -n -e 'print if /oe$/' < /usr/share/dict/words
#
#my @oes = (qw/
#canoes
#does
#foes
#gumshoes
#hoes
#horseshoes
#oboes
#shoes
#snowshoes
#throes
#toes
#/);
#
#my %oes;
#
#@oes{@oes} = (1) x @oes;
#
## A store of words which end in "ie" and whose plural ends in "ies".
#
## References:
## http://www.scrabblefinder.com/ends-with/ie/
## (most of the words are invalid, the above list was manually searched
## for useful words).
#
## Also get a good list using
#
## perl -n -e 'print if /ie$/' < /usr/share/dict/words
#
## There are too many obscure words there though.
#
## Also, I'm deliberately not including "Bernie" and "Bessie" since the
## plurals are rare I think.
#
#my @ies = (qw/
#Aussies
#Valkryies
#aunties
#bogies
#brownies
#calories
#charlies
#coolies
#coteries
#curies
#cuties
#dies
#genies
#goalies
#kilocalories
script/_reposdb-inline view on Meta::CPAN
#oeconomi
#oesophagi
#panni
#periÅci
#phocomeli
#phoeti
#platypi
#polypi
#precunei
#radii
#rhombi
#sarcophagi
#solidi
#stimuli
#succubi
#syllabi
#thesauri
#thrombi
#tori
#trophi
#uteri
#viri
#virii
#xiphopagi
#zygomatici
#/);
#
#my %i_to_us;
#@i_to_us{@i_to_us} = (1) x @i_to_us;
#
## -i to -o
#my @i_to_o = (qw/
# alveoli
# ghetti
# manifesti
# ostinati
# pianissimi
# scenarii
# stiletti
# torsi
#/);
#
#my %i_to_o;
#@i_to_o{@i_to_o} = (1) x @i_to_o;
#
## -i to something else
#
#my %i_to_other = (
# improvisatori => 'improvisatore',
# rhinoceri => 'rhinoceros',
# scaloppini => 'scaloppine'
#);
#
## See documentation below.
#
#sub to_singular
#{
# my ($word) = @_;
# # The return value.
# my $singular = $word;
# if (! $not_plural{$word}) {
# # The word is not in the list of exceptions.
# if ($plural{$word}) {
# # The word has an irregular plural, like "children", or
# # "geese", so look up the singular in the table.
# $singular = $plural{$word};
# }
# elsif ($word =~ /s$/) {
# # The word ends in "s".
# if ($word =~ /'s$/) {
# # report's, etc.
# ;
# }
# elsif (length ($word) <= 2) {
# # is, as, letter s, etc.
# ;
# }
# elsif ($word =~ /ss$/) {
# # useless, etc.
# ;
# }
# elsif ($word =~ /sis$/) {
# # basis, dialysis etc.
# ;
# }
# elsif ($word =~ /ies$/) {
# # The word ends in "ies".
# if ($ies{$word}) {
# # Lies -> lie
# $singular =~ s/ies$/ie/;
# }
# else {
# # Fries -> fry
# $singular =~ s/ies$/y/;
# }
# }
# elsif ($word =~ /oes$/) {
# # The word ends in "oes".
# if ($oes{$word}) {
# # Toes -> toe
# $singular =~ s/oes$/oe/;
# }
# else {
# # Potatoes -> potato
# $singular =~ s/oes$/o/;
# }
# }
# elsif ($word =~ /xes$/) {
# # The word ends in "xes".
# $singular =~ s/xes$/x/;
# }
# elsif ($word =~ /ses$/) {
# if ($ses{$word}) {
# $singular =~ s/ses$/se/;
# }
# else {
# $singular =~ s/ses$/s/;
# }
# }
# elsif ($word =~ $es_re) {
# # Sandwiches -> sandwich
( run in 1.857 second using v1.01-cache-2.11-cpan-39bf76dae61 )