A package to convert words to numbers
Project description
NumWord
NumWord is a Python package that converts numbers written in words to their numerical representation.
Features
- Convert single digits, two digits, large numbers, decimal numbers, and mixed numbers from words to numbers.
- Supports English language.
Installation
To install the package, use pip:
pip install -r requirements.txt
Usage
Here is an example of how to use the NumWord package:
from NumWord.word_to_num import WordToNum
converter = WordToNum(lang='en')
result = converter.words_to_number("one hundred twenty three point four five six")
print(result) # Output: 123.456
Running Tests
To run the tests, use the following command:
python -m unittest discover tests
License
This project is licensed under the MIT License - see the MIT License file for details.
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
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 numword-0.0.1.tar.gz.
File metadata
- Download URL: numword-0.0.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b30682bd2a81c9815bdaa78492d7921e7cb69e5133ac28e8a3a8bb999b4530db
|
|
| MD5 |
db3df55ab6e3cbecf081f5429af47c39
|
|
| BLAKE2b-256 |
6819f85900c1e2e0d9a1e3b6d0d43c6a273e5d86eca00b44ad0fc5d2fa99fb50
|
Provenance
The following attestation bundles were made for numword-0.0.1.tar.gz:
Publisher:
python-publish.yml on HarshitDalal/NumWord
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
numword-0.0.1.tar.gz -
Subject digest:
b30682bd2a81c9815bdaa78492d7921e7cb69e5133ac28e8a3a8bb999b4530db - Sigstore transparency entry: 167240428
- Sigstore integration time:
-
Permalink:
HarshitDalal/NumWord@ea37fe1ced28577f88038c95ff63d79e243b91ae -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/HarshitDalal
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ea37fe1ced28577f88038c95ff63d79e243b91ae -
Trigger Event:
release
-
Statement type:
File details
Details for the file NumWord-0.0.1-py3-none-any.whl.
File metadata
- Download URL: NumWord-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0dfd77fd417b3821dd7e26eba6dafa0d5e5401ea8f0089807c9c28eb6330c0c
|
|
| MD5 |
b18207c3ffd92cec89bc5a09c8510398
|
|
| BLAKE2b-256 |
4ba3f111ce6f697b130a88af04d9d443ef73f5f4e59d0a958e5bea212df762ff
|
Provenance
The following attestation bundles were made for NumWord-0.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on HarshitDalal/NumWord
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
numword-0.0.1-py3-none-any.whl -
Subject digest:
f0dfd77fd417b3821dd7e26eba6dafa0d5e5401ea8f0089807c9c28eb6330c0c - Sigstore transparency entry: 167240432
- Sigstore integration time:
-
Permalink:
HarshitDalal/NumWord@ea37fe1ced28577f88038c95ff63d79e243b91ae -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/HarshitDalal
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ea37fe1ced28577f88038c95ff63d79e243b91ae -
Trigger Event:
release
-
Statement type: