View Code? Open in Web Editor
NEW
Replace english, russian and ukrainian cardinal numerals with corresponding numbers in the given text. Small library, available on PyPI.
Home Page: https://pypi.org/project/numberize/
License: MIT License
numberize's People
Contributors
Watchers
numberize's Issues
Input text: one five thousand bucks
Expected output: [1, 5000]
Actual result: 6000
Input text: one two three four five thousand bucks
Expected output: [1, 2, 3, 4, 5000]
Actual result: 15000
when installing via pip install numberize
gives
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\ \HostX86\\x64\\cl.exe' failed with exit code 2
Input text: hundred
Expected result: 100
Actual result: 200
Input text: ~three hundred bucks~
Expected result: 300
Actual result: none
Originates from this issue:
Lanasys/exchange-rates-tg-bot#11
Input text: 20 миллиардов долларов
Expected result: 20000000000
Actual result: 20 1000000000 долларов
Works as intended, actually, but as it may be expected.