Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text_to_number-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_to_number-0.1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

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

Hashes for text_to_number-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5c164a72fd9375cd5cd1f4321e00ac3ee88fb82156b85e6701e98bf97c26daa5
MD5 67e0bccf58b6e67b7fa8116db2ac5d89
BLAKE2b-256 6107a7eb84862aaaf940780c6104a80890a838bff3b0c42d48ae3b5bfddd84eb

See more details on using hashes here.

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

Hashes for text_to_number-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce6a955ad4762d83530b4997811d19666e2627541f9693e5f24ee4907def0838
MD5 5bc744b270ed3fd8ed45a4a8d7c147ad
BLAKE2b-256 f2c9ee6a06d0b1c4f483762e026cdffcdf87007d1d520aee91814b7c033a491b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page