1Lingua::EN::Inflect::NuUmsbeerr(C3o)ntributed Perl DocumLeinntgautai:o:nEN::Inflect::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

SEE ALSO

48       Lingua::EN::Inflect
49

REPOSITORY

51       <https://github.com/neilbowers/Lingua-EN-Inflect-Number>
52

AUTHOR

54       Simon Cozens, "simon@cpan.org"
55
57       This software is copyright (c) 2004 by Simon Cozens "simon@cpan.org"
58
59       This is free software; you can redistribute it and/or modify it under
60       the same terms as the Perl 5 programming language system itself.
61
62
63
64perl v5.36.0                      2022-07-22    Lingua::EN::Inflect::Number(3)
Impressum