1Number(3)             User Contributed Perl Documentation            Number(3)
2
3
4

NAME

6       Lingua::EN::Inflect::Number - Force number of words to singular or
7       plural
8

SYNOPSIS

10         use Lingua::EN::Inflect::Number qw(
11           number to_S to_PL # Or anything you want from Lingua::EN::Inflect
12         );
13
14         print number("goat");  # "s" - there's only one goat
15         print number("goats"); # "p" - there's several goats
16         print number("sheep"); # "ambig" - there could be one or many sheep
17
18         print to_S("goats");   # "goat"
19         print to_PL("goats");  # "goats" - it already is
20         print to_S("goat");    # "goat" - it already is
21         print to_S("sheep");   # "sheep"
22

DESCRIPTION

24       This module extends the functionality of Lingua::EN::Inflect with three
25       new functions available for export:
26
27   number
28       This takes a word, and determines its number. It returns "s" for
29       singular, "p" for plural, and "ambig" for words that can be either
30       singular or plural.
31
32       Based on that:
33
34   to_S / to_PL
35       These take a word and convert it forcefully either to singular or to
36       plural. "Lingua::EN::Inflect" does funny things if you try to pluralise
37       an already-plural word, but this module does the right thing.
38

DISCLAIMER

40       The whole concept is based on several undocumented features and
41       idiosyncracies in the way Lingua::EN::Inflect works. Because of this,
42       the module only works reliably on nouns. It's also possible that these
43       idiosyncracies will be fixed at some point in the future and this
44       module will need to be rethought. But it works at the moment.
45       Additionally, any disclaimers on Lingua::EN::Inflect apply double here.
46

AUTHOR

48       Simon Cozens, "simon@cpan.org"
49

SEE ALSO

51       Lingua::EN::Inflect.
52
53
54
55perl v5.12.0                      2004-02-28                         Number(3)
Impressum