Lingua::ID::Words2Nums - Convert Indonesian verbage to number
use Lingua::ID::Words2Nums qw(words2nums words2nums_simple); print words2nums("seratus tiga koma dua"); # 103.2 print words2nums("minus 3 juta 100 ribu"); # 3100000 print words2nums("1,605 jt"); # 1605000 (abbreviations accepted) print words2nums("-1.3e4"); # 13000 print words2nums_simple("satu dua tiga"); # 123
This module provides two functions, words2nums and words2nums_simple. They are the counterpart of Lingua::ID::Nums2Words's nums2words and nums2words_simple.
None are exported by default, but they are exportable.
A regex for quickly matching/extracting verbage from text; it looks for a string of words. It's not perfect (the extracted verbage might not be valid, e.g. "ribu tiga"), but it's simple and fast.
Parse::Number::ID is used to parse numbers in the verbage.
Steven Haryanto <firstname.lastname@example.org>
This software is copyright (c) 2012 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.