Canonicalization and Darija Representation - Bidirectional transliteration for Darija
Project description
CaDaR: Moroccan Darija Transliteration
High-performance bidirectional transliteration for Darija (Moroccan Arabic)
CaDaR provides seamless conversion between Arabic script and Latin script for Moroccan Darija, with intelligent vowel handling and Darija-aware linguistic processing.
Features
- 🔄 Bidirectional: Arabic ↔ Latin transliteration
- 🎯 Smart Vowels: Distinguishes long (aa, ee, ii) vs short (a, e, i) vowels
- 🇲🇦 Darija Mode: Readable informal writing style
- 🚀 Fast: Rust core with Python bindings
- ✨ Standardization: Normalize mixed-script text
Installation
pip install cadar
Quick Start
import cadar
# Latin to Arabic
cadar.bizi2ara("salam 3likom")
# Output: "سلام عليكم"
# Arabic to Latin
cadar.ara2bizi("كيفاش داير؟")
# Output: "kifash dayer?"
# Smart vowel handling (v0.1.9+)
cadar.bizi2ara("imken") # → "يمكن" (short 'e' skipped)
cadar.bizi2ara("salaam") # → "سالام" (long 'aa' preserved)
cadar.bizi2ara("daba") # → "دابا" (short 'a' written in Darija mode)
API
Simple Functions
cadar.bizi2ara(text, darija="Ma") # Latin → Arabic
cadar.ara2bizi(text, darija="Ma") # Arabic → Latin
cadar.ara2ara(text, darija="Ma") # Standardize Arabic
cadar.bizi2bizi(text, darija="Ma") # Standardize Latin
CaDaR Class
processor = cadar.CaDaR(darija="Ma")
processor.bizi2ara("salam") # Reusable processor
processor.ara2bizi("سلام")
Smart Vowel Handling (v0.1.9+)
CaDaR intelligently handles vowels for natural Darija writing:
Long vowels (aa, ee, ii, oo, uu) → Single Arabic letter:
"salaam"→"سالام"(long aa)"kaatb"→"كاتب"(long aa in middle)
Short vowels - Context-aware:
"imken"→"يمكن"(middle 'e' skipped)"salam"→"سالام"(middle 'a' written - Darija mode)"daba"→"دابا"(middle 'a' written)
Bidirectional preservation:
"سلام"→"slam"→"سلام"✓ Perfect round-trip
Use Cases
- Chat Apps: Support users in both scripts
- Search: Match queries regardless of script
- NLP: Normalize Darija text for ML
- Data Processing: Standardize mixed-script datasets
Documentation
- Full Docs: https://oit-technologies.github.io/CaDaR/
- GitHub: https://github.com/Oit-Technologies/CaDaR
- Issues: GitHub Issues
License
MIT License - See LICENSE
Made with ❤️ for the Darija community
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 Distributions
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 cadar-0.1.10.tar.gz.
File metadata
- Download URL: cadar-0.1.10.tar.gz
- Upload date:
- Size: 135.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a95cd728c9d0422de8aa2da85461141bcdb4935b9b869d20461394dff0914e4
|
|
| MD5 |
6efe587879350fbd909ceb99b6a62b0c
|
|
| BLAKE2b-256 |
db1fc4e3cfc800935aebe4a8d4d35532bc1a968377ed98f207792acc329f3177
|
File details
Details for the file cadar-0.1.10-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: cadar-0.1.10-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 842.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1a6af969714eac7caa933963d7c7822a66482309e3d1372ef318a6602559d0b
|
|
| MD5 |
f6eb4cf2522f94d58d706bf0fe8a51d2
|
|
| BLAKE2b-256 |
721568dbcd35c4dc98226091f8f80f782a7526e4191fd6c35c13e0e71b613eef
|
File details
Details for the file cadar-0.1.10-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: cadar-0.1.10-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 952.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d43cee282f8b1fa757b5a0e75daac9734e9f16b68a7af240584f65b7b81b1f2
|
|
| MD5 |
117e2476f06521c498689cda17c36c2b
|
|
| BLAKE2b-256 |
a5c34d186210256781a10e86f1d2039554ffef391e3e58012e2cdc0bb6debdee
|
File details
Details for the file cadar-0.1.10-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: cadar-0.1.10-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 835.8 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a46a91897241e338b923994936bc8f3cf656528c4d0f233b29afa9ee836069c9
|
|
| MD5 |
c946b6aeae0f02ef326c8c5da602b14c
|
|
| BLAKE2b-256 |
41266b8f4e0c50b100c7194ce808c0451bcb92c72828387f3bc105260a1f5042
|
File details
Details for the file cadar-0.1.10-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: cadar-0.1.10-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 842.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ada750112cceebca1e094052cc1e8dc0142d70b8a6782870c903beef7d8093b
|
|
| MD5 |
e7ee05b78d23862320b2ad2ebad25178
|
|
| BLAKE2b-256 |
d9d5eb600bda47f8c6b0ab88d9bf6be2369baf1a58d1e9c15d07fcf2f7bfad75
|
File details
Details for the file cadar-0.1.10-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: cadar-0.1.10-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 951.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb19b72c243e704b1df2b5795f9efc56a016f0ecd5e109cb22ccb27d8d0dae1
|
|
| MD5 |
87cdc4b9ba45aed1fab4143fc69c124f
|
|
| BLAKE2b-256 |
69b12e05475a460a87d874195c654f41ec2a759edc457cb97f1ed7a919d45778
|
File details
Details for the file cadar-0.1.10-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: cadar-0.1.10-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 838.3 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
968e6a6e934dc6ee0aeaf91684f0645c4adf2676da3eb79a6fc338694aac653a
|
|
| MD5 |
588025a0821c0c2503d312564f4b3557
|
|
| BLAKE2b-256 |
3fa18bb04ae306652f7ece618784b9c134e2ed2ce40c963cd153e0b81ef2611e
|
File details
Details for the file cadar-0.1.10-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: cadar-0.1.10-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 842.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afdacaa34c5467df612099fd9848e7f1f8d97607848dc3ddf8f02df1f9690995
|
|
| MD5 |
ad5eab210c3331b9962f1ff23db365c2
|
|
| BLAKE2b-256 |
83c4c364dfbe3f894909a3e4bce9d153f6d630e2b99005bba0190762b9277586
|
File details
Details for the file cadar-0.1.10-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: cadar-0.1.10-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 951.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91d3ed6c13f043f947a5d9e88ebbe358ef39f1d8af51597eaedd5473768f6ce9
|
|
| MD5 |
397366e8fefae453017e7a54e66356f6
|
|
| BLAKE2b-256 |
17189417adc33566917742c6643c54da2b2432ff0c08ae30c7ef08a53bbe7bc7
|
File details
Details for the file cadar-0.1.10-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: cadar-0.1.10-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 838.4 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe57bca2897328f44502fd3bb5075c152628a775bbeb222c4f7f5053a5302d63
|
|
| MD5 |
1cd6ba7ba5d964953728d10e04293f35
|
|
| BLAKE2b-256 |
df1971c1d8c526d6e753e3560cf82d457e1e3e65a47889576ed4312d1ce811b9
|
File details
Details for the file cadar-0.1.10-cp39-cp39-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: cadar-0.1.10-cp39-cp39-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 951.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66947bde6966964a8dd2d01f91876105a2262edf8ebff82f8705f93771255475
|
|
| MD5 |
21bcdf556022ac40d029345474a2a77e
|
|
| BLAKE2b-256 |
dd2c7af3628588975e992840c424120e5acc473c3b6bfd54b040eb1fdec8cd94
|
File details
Details for the file cadar-0.1.10-cp38-cp38-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: cadar-0.1.10-cp38-cp38-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 951.9 kB
- Tags: CPython 3.8, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efa322139b1d1396eb18d6dcfd49f0002a4a0017ff3d958e792245234cd59ce0
|
|
| MD5 |
e65c96d0e62fd1778d5bc875a2b3d912
|
|
| BLAKE2b-256 |
d8478631cee447d42a34c6d53501bf15fe72e84b08dc1e18495f45784ebff977
|