Convert Vietnamese numbers to words
Project description
vnnum2word
Convert numbers to words, with a focus on the Vietnamese language.
This project is inspired by (num2words)[https://github.com/savoirfairelinux/num2words].
The original (num2words)[https://github.com/savoirfairelinux/num2words] library formats numbers into floats with two decimal places. For example:
from num2words import num2words
num2words(12.5, lang='vi')
# mười hai phẩy năm mươi
num2words(12.556, lang='vi')
# mười hai phẩy năm mươi sáu
However, in Vietnamese, these results are often inaccurate or unnatural. This package fixes those issues and provides more accurate and natural outputs for Vietnamese numbers.
Installation
pip install vnnum2word
Usage
from vnnum2word import WordConverter
converter=WordConverter()
converter(12.5)
# mười hai phẩy năm
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
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 vnnum2word-0.2.0.tar.gz.
File metadata
- Download URL: vnnum2word-0.2.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
742f21c9d36cb301580ca4cc973dfe1a32f6f15471cb89c85b4bae10f97e7440
|
|
| MD5 |
f7f196013d144b62e1cec867907b6897
|
|
| BLAKE2b-256 |
b950618af4f4aaf6a07338e18892b95a8b8ed54385009cd2644c300dc4016a07
|
File details
Details for the file vnnum2word-0.2.0-py3-none-any.whl.
File metadata
- Download URL: vnnum2word-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f054dbc9417dee07b2816a9843411cb46c74e5a4686fb32d228fc49058f8269
|
|
| MD5 |
0b2949216352399a3e08341dc5f89d6c
|
|
| BLAKE2b-256 |
502141f048f7d4cb99207b87847246df7f1d52b350c104e4c0957320589e4a1c
|