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.2.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.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file text_to_number-0.1.2.tar.gz.

File metadata

  • Download URL: text_to_number-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 27388333b47c531e04bbbf048a8ae6f60a4f6a39d19b26616fdef2161a774222
MD5 7ec71054bac9662514b18e7713c0d89c
BLAKE2b-256 1495ecb248df058b1a66ca3b1e9604189a3f61b46ce7d20ab211c77bbe6b6bbc

See more details on using hashes here.

File details

Details for the file text_to_number-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: text_to_number-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 930a07cd5249d579c60b6be13cc5afb5177609e8c2f9267d729e0100445abd1e
MD5 d12ce98ceb2dc435d764a5529c03501d
BLAKE2b-256 2a5704d55db890e6161b4873c4ec2fc02ada21804d3ce39fd7463c3ae3cc6576

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