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/yourusername/text-to-number

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: text_to_number-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 5c0416300a2281500fde73d71eb881192fb85155b120e854f6c0070a19c43691
MD5 5db3a7b4a834df85ac554bd282712707
BLAKE2b-256 176d9b1013bb6a752d1c8cd3efdb98f6381d7381c12234306a17ea9db3a1cd4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: text_to_number-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 375e4669e58692ca3ba2b38a8f40a068665bfc59b80d200ce80f40c112135a40
MD5 6626d5303b6215e9112daafd3b2f00da
BLAKE2b-256 44c444711ea48a4238d4342f309b7b1f604d482d3487a11e591ebf325ace0cb4

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