JKhakpour / petit

Persian text -> integer, ineteger -> text converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

petit

Persian text -> integer, ineteger -> text converter

>>> from petit import text_to_num, num_to_text, num_to_ordinal
>>> text_to_num("منفی یک")
-1
>>> num_to_text(-123)
'منفی یکصد و بیست و سه'
>>> num_to_ordinal(23)
'بیست و سوم'

Please open an issue if there are any wrong conversions.

About

Persian text -> integer, ineteger -> text converter

License:MIT License


Languages

Language:Python 100.0%