I must exclaim my joy to all Monks!

I needed to display the english words representing numbers for a project I am working on, and I (rightly) figured SOMEONE must have written such a beast, so I went to the CPAN. After fruitlessly searching http://search.cpan.org for various combinations like``number to english'', I tried SuperSearch using the search string, 'number to english perl module', and was rewarded with a set of results, which included Re: Number to Speech, from which I was quickly able to zero in on Number::Spell and Lingua::EN::Num2Words (I ultimately chose the latter).

dmm

Thanks, Monks!


You can give a man a fish and feed him for a day ...
Or, you can teach him to fish and feed him for a lifetime
  • Comment on PerlMonks.org Comes Through Even Though Search.CPAN.org Failed Me

Replies are listed 'Best First'.
Re: PerlMonks.org Comes Through Even Though Search.CPAN.org Failed Me
by TheDamian (Vicar) on Nov 29, 2001 at 01:22 UTC
    You might also like to take a look at Lingua::EN::Inflect, which has a more highly configurable numbers-to-words converter than either of the two modules you mentioned.

    For example Lingua::EN::Inflect:

    • supports decimals
    • ignores intranumeral punctuation
    • allows alternative groupings of digits (to correct pronounce phone numbers, IP addresses, etc.)
    • allows alternative pronunciations of 'zero', 'point', and 'and'
    • understands ordinals
    One reason not to choose it is that it currently doesn't handle numbers bigger than ninety-nine decillion, nine hundred and ninety-nine nonillion, nine hundred and ninety-nine octillion, nine hundred and ninety-nine septillion, nine hundred and ninety-nine sextillion, nine hundred and ninety-nine quintillion, nine hundred and ninety-nine quadrillion, nine hundred and ninety-nine trillion, nine hundred and ninety-nine billion, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine (i.e. 999,999,999,999,999,999,999,999,999,999,999,999)

    The next release (due RSN) will handle numbers of any size, using the extensible notation described by Conway (no relation) and Guy in The Book of Numbers.

Re: PerlMonks.org Comes Through Even Though Search.CPAN.org Failed Me
by giulienk (Curate) on Nov 28, 2001 at 00:26 UTC
    I'd like to remark how search.cpan.org really sucks to us. If you don't know the exact name of the module you got to search you are out of luck.

    Is it really like that or i'm missing some more powerful search engine for perl modules? (excluding Super Search and Google of course).

    gkinueliileunikg

      Use CPAN to search on documentation, rather than module name. It's in the little drop box, just above the search field.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.