Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.
Danylo Yemchenko edited this page Aug 9, 2021 · 10 revisions

How to install it?

pip install numberize

or

pip install /path/to/numberize-1.0.0-py3-none-any.whl

if you prefer to store it local

How to use it?

In the current version there's only one function available.

import numberize
numberizer = numberize.Numberizer(lang='ru')    #or 'uk', 'en'

print(
    numberizer.replace_numerals(
        """
        "сто" - очень простое слово. пятьсот девяносто два миллиона долларов.
        девять-восемь, тридцати шести и пяти  
        """
    )
)

Output:
>>> "100" - очень простое слово. 592000000 долларов.
        9-8, 36 и 5 

It's that simple

Links

Used morphological analyzer:

Feel free to add links to your projects, if they are using this library or related to it in any way:

Clone this wiki locally