Metadata-Version: 2.4
Name: vnnum2word
Version: 0.2.0
Summary: Convert Vietnamese numbers to words
Project-URL: Homepage, https://github.com/jayll-packages/vnnum2word
Author-email: JayLL <jayll13.work@gmail.com>
License: MIT License
        
        Copyright (c) 2025 JayLL Packages
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: nlp,number,vietnamese,words
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# 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:

```python
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

```bash
pip install vnnum2word
```

# Usage

```python
from vnnum2word import WordConverter
converter=WordConverter()
converter(12.5)
# mười hai phẩy năm
```