Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/marwan-ahmed-23/tafqit-python

A Python-powered service that converts numbers into words, supporting multiple languages.
https://github.com/marwan-ahmed-23/tafqit-python

number-conversion number-to-words numeric-processing open-source open-source-python python python-library python-tools software-development text-generation

Last synced: 10 days ago
JSON representation

A Python-powered service that converts numbers into words, supporting multiple languages.

Awesome Lists containing this project

README

        

# Tafqit (Python): Convert Numbers to Words in Arabic

Tafqit-Python is a lightweight and modular Python service designed to convert numerical values into their textual representation. The service currently supports Arabic and English and offers a flexible foundation for extending to additional languages.

---

## πŸš€ Features

- **Multi-Language Support:** Out-of-the-box support for Arabic and English.
- **Arabic Number Conversion:** Converts integers into grammatically correct Arabic words.
- **Customizable:** Modular design for adding support for other languages.
- **Lightweight and Efficient:** Designed with simplicity and performance in mind.

## βš™οΈ Requirements

- Python 3.6 or higher.

## πŸ”§ Installation

To use Tafqit-Python, clone the repository to your local machine:

```bash
git clone https://github.com/marwan-ahmed-23/tafqit-python.git
cd tafqit-python
```

## πŸ“– Usage

Here’s a simple example of how to use Tafqit-Python:

```bash
from src.tafqit import Tafqit

# Create an instance of the Tafqit class
tafqit = Tafqit()

# Convert a number to Arabic text
number = 12345
arabic_result = tafqit.convert_to_words(number, language="ar")
print(f"Number in Arabic: {arabic_result}")

# Convert a number to English text
english_result = tafqit.convert_to_words(number, language="en")
print(f"Number in English: {english_result}")
```

## πŸ“‚ Directory Structure
```plaintext
tafqit-python/
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ tafqit.py
β”‚ └── __init__.py
β”œβ”€β”€ examples/
β”‚ └── example.py
β”œβ”€β”€ tests/
β”‚ └── test_tafqit.py
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
└── requirements.txt
```

## Tests

Run the following command to execute the tests:

```bash
pytest tests/test_tafqit.py
```

## πŸ› οΈ Contributing

Contributions are welcome! Here's how you can get involved:

- Fork the repository.
- Create a new branch `git checkout -b feature-branch`.
- Commit your changes `git commit -m "Add new feature"`.
- Push to the branch `git push origin feature-branch`.
- Open a Pull Request.

## 🌟 Show Your Support
If you found this project helpful, please consider giving it a ⭐ on GitHub. Your support means the world to us!