A package to convert text numbers into integers.
Project description
Text-to-Number
Convert textual numerical descriptions into their digit forms within strings, like turning "one apple" into "1 apple". Ideal for preprocessing text data for analysis or applications requiring numerical representations.
Installation
Install via pip:
pip install text-to-number
Usage
To convert text in your Python code:
from text_to_number import text_to_number
result = text_to_number("I have two apples and three bananas.")
print(result) # Outputs: "I have 2 apples and 3 bananas."
Features
- Converts words to digits within a string.
- Supports numbers from zero to billions.
- Handles both singular and compound numbers (e.g., "twenty-one").
Contributing
Contributions are welcome! See our contributing guidelines on GitHub.
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Soham Padia - sohampadia10@gmail.com
Project Link: https://github.com/soham-padia/textToInt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file text_to_number-0.1.1.tar.gz.
File metadata
- Download URL: text_to_number-0.1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c164a72fd9375cd5cd1f4321e00ac3ee88fb82156b85e6701e98bf97c26daa5
|
|
| MD5 |
67e0bccf58b6e67b7fa8116db2ac5d89
|
|
| BLAKE2b-256 |
6107a7eb84862aaaf940780c6104a80890a838bff3b0c42d48ae3b5bfddd84eb
|
File details
Details for the file text_to_number-0.1.1-py3-none-any.whl.
File metadata
- Download URL: text_to_number-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce6a955ad4762d83530b4997811d19666e2627541f9693e5f24ee4907def0838
|
|
| MD5 |
5bc744b270ed3fd8ed45a4a8d7c147ad
|
|
| BLAKE2b-256 |
f2c9ee6a06d0b1c4f483762e026cdffcdf87007d1d520aee91814b7c033a491b
|