Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/marwan-ahmed-23/tafqit-python
- Owner: marwan-ahmed-23
- License: mit
- Created: 2024-12-02T01:41:16.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-29T09:13:30.000Z (18 days ago)
- Last Synced: 2024-12-29T10:19:35.327Z (18 days ago)
- Topics: number-conversion, number-to-words, numeric-processing, open-source, open-source-python, python, python-library, python-tools, software-development, text-generation
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!