Lingua::EN::FindNumber(3) Locate (written) numbers in English text

SYNOPSIS


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

DESCRIPTION

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

EXPORTED METHODS

extract_numbers / numify / $number_re

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

AUTHOR

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

BUGS and QUERIES

Please direct all correspondence regarding this module to:
  [email protected]

COPYRIGHT AND LICENSE

Copyright 2003-2005 by Simon Cozens

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.