in reply to Parsing human notations of numbers
For general numbers there is Lingua::EN::FindNumber. Here's an example from its POD:
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"
It's pretty easy to use, and surprisingly thorough, though I haven't had a chance to test if it handles fractions.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parsing human notations of numbers
by nothingmuch (Priest) on Jan 16, 2005 at 07:40 UTC | |
by davido (Cardinal) on Jan 16, 2005 at 07:41 UTC | |
by nothingmuch (Priest) on Jan 16, 2005 at 07:47 UTC | |
by davido (Cardinal) on Jan 16, 2005 at 07:50 UTC |