Usage
Python 3 only!
from t2d import Text2Digits
Text2Digits().convert("I was born in nineteen ninety two and am twenty six years old!")
Output:
"i was born in 1992 and am 26 years old!"
I find this useful if using Alexa/Lex to convert audio to text and have to convert the text to digits.
Improvements/Issues
- Still need to add support for decimal numbers
- Need to add support for negative numbers
Acknowledgements
I have heavily used code from the SO answers from here: https://stackoverflow.com/questions/493174/is-there-a-way-to-convert-number-words-to-integers and improved upon them
Metadata
Release files for text2digits-careless25 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| text2digits-careless25-0.0.2.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| text2digits_careless25-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 kB
Release files / text2digits-careless25-0.0.2.tar.gz
| Download URL | text2digits-careless25-0.0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfbd87cc3e8d2b4accd436948cc870189732fc65e1fcadbfaf3ff3ddc0890ff3
|
|
BLAKE2b-256 checksum How to use checksums |
eadadba35e458ff9d3dbd7daabf99cf117078bd14019fe7b7e99513f978a867a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4
|
Release files / text2digits_careless25-0.0.2-py3-none-any.whl
| Download URL | text2digits_careless25-0.0.2-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7357688531dc992af1909a4aaaf859f1f2e9dc37625188f3e430779b49b1c798
|
|
BLAKE2b-256 checksum How to use checksums |
bfc2e42c5e6b0e38386a77420ba4567b309e5339a3f064fa798915461c72e964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4
|