A Python package to parse and convert Dutch counting numbers into numeric equivalents, supporting numbers up to one million.
Project description
py_dutch_numerals
py_dutch_numerals is a Python package that parses and converts Dutch written numbers into their numeric equivalents, supporting numbers up to one million.
Installation
You can install py_dutch_numerals using pip:
pip install py_dutch_numerals
Usage
Here's a basic example of how to use py_dutch_numerals:
from py_dutch_numerals import tel
# Convert a Dutch number to an integer
result = tel("driehonderdvijfenveertig")
print(result) # Output: 345
# It also handles larger numbers
result = tel("een miljoen tweehonderdduizend")
print(result) # Output: 1200000
Features
- Parses Dutch written numbers and converts them to integers
- Supports numbers up to one million
- Handles compound numbers (e.g., "eenentwintig" for 21)
- Uses ANTLR4 for robust parsing
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License - see the LICENSE file for details.
Author
Jeroen Bloemscheer
Acknowledgments
- This project uses ANTLR4 for parsing
- Inspired by the need for processing Dutch numerical text in various applications
Support
If you encounter any problems or have any questions, please open an issue on the GitHub repository.
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
File details
Details for the file py_dutch_numerals-1.0.3.tar.gz
.
File metadata
- Download URL: py_dutch_numerals-1.0.3.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f3bbb17c7182ea548495a36d2ff2df24bbf7c608503cacafb47c95b97949a9a |
|
MD5 | 184d94d9ba10cf8370014c486a9f50f8 |
|
BLAKE2b-256 | 871bcd293096f81a5cd2f9062a21c0d1e96f51532092f0d1b12424972fe1ffec |
File details
Details for the file py_dutch_numerals-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: py_dutch_numerals-1.0.3-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0818e32983266451e9d55058cc944e114c03758029c6677b2059530e16209656 |
|
MD5 | a0a68e8c6fe368a183ef758a9e3a3d11 |
|
BLAKE2b-256 | dce904713c58291b6c4cd39d5c99a4f05e0d9f98d2354836c7f20b41d60f5f51 |