π Python toolkit for processing, normalizing, and transliterating Amharic Ge'ez text
# π Amharic NLP Toolkit
A lightweight Python toolkit for processing, normalizing, and transliterating Amharic (Ge'ez script) text. Designed for preprocessing text in machine learning pipelines and linguistic applications.
## Features
- **Text Normalization:** Replaces homophones (sound-alike characters such as `α`, `α
`, `α ` with standard equivalents `α`, `α`, `α°`) to eliminate spelling variations.
- **Word & Sentence Tokenization:** Tokenizes text based on traditional Amharic punctuation marks like `α‘` (word separator) and `α’` (sentence ender).
- **Stopwords Filter:** Built-in list of common Amharic stopwords for text filtering.
- **Transliteration:** Phonetically maps Ge'ez characters to Latin characters.
- **CLI Utility:** Quick command-line interface for common operations.
## Structure
```
βββ amharic_nlp/
β βββ __init__.py
β βββ normalizer.py
β βββ stopwords.py
β βββ tokenizer.py
β βββ transliterator.py
βββ tests/
β βββ test_nlp.py
βββ cli.py
βββ setup.py
βββ requirements.txt
```
## Installation
```bash
git clone
github.com
cd amharic-nlp-toolkit
pip install -e .
```
## Usage
### Python API
```python
from amharic_nlp.normalizer import normalize_text
from amharic_nlp.transliterator import transliterate
text = "αααα‘α α£αα‘αα
α‘αα΅α’"
normalized = normalize_text(text)
print(normalized) # Output: αΈαα α α£α αα
αα΅α’
trans = transliterate("α°αα")
print(trans) # Output: selame
```
### CLI
```bash
python3 cli.py normalize --text "ααααα"
# Output: ααααα
```
## License
This project is licensed under the MIT License - see the LICENSE file for details.