I’ve been working on a PHP function that will parse pronounceable representatiion of number into numeric value. It can be useful for validating sensitive user entries such as payment amount, etc, by entering not only the number, but the pronounceable numbers. For example a text if "sepuluh ribu" can be parsed into 10000.

Give it a try, or download the source.

Only works with Indonesian language

UPDATE Friday, March 16 2007
Fixing bug while parsing text like "dua puluh tiga ribu"

UPDATE Tuesday, March 20 2007
Fix some sloppy coding :p

UPDATE Wed, March 21 07
Influenced with Lingua::ID::Words2Num package by Om steven.

UPDATE Wed, March 22 07
Om steven emailed me and send a pretty test-suite for text2number function. I’ve put it on the demo page, nice. Thanks om steven …