How to use
- Copy the installation command and review the source package before installing it in your own agent environment.
- Check the source document for required tools, credentials and supported hosts.
- Describe your input and desired deliverable; review the output against the source material.
npx skills add https://github.com/moshe-ship/mkhlab --skill arabic-ocrBefore you start
- Installation does not include a model subscription, API allowance or permission to access your files.
- Repository stars and installation counts describe activity, not an independent quality or security test.
Original skill document
Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.
التعرف على النص العربي (OCR)
QARI-OCR (الأفضل للعربي)
عبر HuggingFace API
bash
curl -s -X POST "https://api-inference.huggingface.co/models/qari-ai/QARI-OCR-v0.3" \
-H "Authorization: Bearer $HF_TOKEN" \
-H "Content-Type: image/png" \
--data-binary @IMAGE_FILETesseract (محلي — بديل مجاني)
تثبيت
bash
# macOS
brew install tesseract tesseract-lang
# التأكد من دعم العربي
tesseract --list-langs | grep araاستخراج النص
bash
tesseract IMAGE_FILE output -l ara
cat output.txtعربي + إنجليزي معاً
bash
tesseract IMAGE_FILE output -l ara+engتحسين الدقة
bash
# تحسين الصورة أولاً
magick IMAGE_FILE -resize 300% -sharpen 0x1 -threshold 50% improved.png
tesseract improved.png output -l ara --psm 6متى تستخدم
- المستخدم يرسل صورة فيها نص عربي
- يريد استخراج نص من مستند PDF ممسوح
- يريد قراءة مخطوطة أو وثيقة قديمة
- يريد تحويل صورة واتساب فيها نص لنص قابل للنسخ
أوضاع PSM (Page Segmentation Modes)
| الوضع | الاستخدام |
|---|---|
--psm 3 | تلقائي (افتراضي) |
--psm 6 | كتلة نص واحدة (الأفضل للمستندات) |
--psm 7 | سطر واحد |
--psm 8 | كلمة واحدة |
--psm 13 | نص خام بدون OSD |
القواعد
- الصور الواضحة عالية الدقة تعطي نتائج أفضل
- المخطوطات والخطوط المزخرفة تكون أقل دقة — نبّه المستخدم
- إذا النتيجة ضعيفة، اقترح تحسين الصورة أولاً
