pynumwords r39

pynumwords transforms numbers into human words, a Python library.
pynumwords transforms numbers into human words, a Python library.

pynumwords demonstration enter a number here Try

This library currently includes engines for these writing systems:

N-base (binary, octal, decimal, hexademical)
Fractional numbers
Morse
Roman
English
German (thanks Diedrich Vorberg for contributing this)
Lithuanian
Chinese (both traditional and simplified)
Hebrew
I would greatly appreciate fixes to current engines (or bug reports), and new engine additions.

This is how you can use pynumwords in your code:

import pynumwords
en = pynumwords.find('english')
if en:
try:
print en(123456)
except ValueError:
...

If you know about validity, this is fine:

val = pynumwords.find('roman')(123)

pytimeago is licenced under LGPL. I'd be happy to hear if you use this in your software. Note that language module(s) can also be taken standalone to other projects, if desired.

last updated on:
December 20th, 2006, 15:14 GMT
price:
FREE!
developed by:
Adomas Paltanavicius
homepage:
adomas.org
license type:
LGPL (GNU Lesser General Public License) 
category:
ROOT \ Text Editing&Processing \ Others

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT