1Lingua::EN::FindNumber(U3s)er Contributed Perl DocumentatLiionngua::EN::FindNumber(3)
2
3
4

NAME

6       Lingua::EN::FindNumber - Locate (written) numbers in English text
7

SYNOPSIS

9         use Lingua::EN::FindNumber;
10         my $text = "Fourscore and seven years ago, our four fathers...";
11
12         numify($text); # "87 years ago, our 4 fathers..."
13
14         @numbers = extract_numbers($text); # "Fourscore and seven", "four"
15
16         while ($text =~ /$number_re/g) { # Build your own iterator
17

DESCRIPTION

19       This module provides a regular expression for finding numbers in
20       English text. It also provides functions for extracting and
21       manipulating such numbers.
22

EXPORTED METHODS

24   extract_numbers / numify / $number_re
25         numify($text); # "87 years ago, our 4 fathers..."
26
27         @numbers = extract_numbers($text); # "Fourscore and seven", "four"
28
29         while ($text =~ /$number_re/g) { # Build your own iterator
30

SEE ALSO

32       This module was written for the Natural Languages chapter of the second
33       edition of Advanced Perl Programming.
34
35       This module works rather well in conjunction with
36       Lingua::EN::Words2Nums, which is a very cool module anyway.  (And Simon
37       stole some of this module's code from it. Thanks, Joey!)  It may also
38       be involved with Lingua::EN::NamedEntity in the future, so check that
39       one out too.
40

REPOSITORY

42       <https://github.com/neilb/Lingua-EN-FindNumber>
43

AUTHOR

45       This module was originally written by Simon Cozens.  It was then
46       maintained from 2004 to 2005 by Tony Bowden.  Since 2014 it has been
47       maintained by Neil Bowers.
48

BUGS and QUERIES

50       Please direct all correspondence regarding this module to:
51         bug-Lingua-EN-Number@rt.cpan.org
52
54       Copyright 2003-2005 by Simon Cozens
55
56       This library is free software; you can redistribute it and/or modify it
57       under the same terms as Perl itself.
58
59
60
61perl v5.28.0                      2015-10-25         Lingua::EN::FindNumber(3)
Impressum