PyArabic
PyArabic: A Python package for Arabic text - Published in JOSS (2023)
Science Score: 100.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 9 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
3 of 16 committers (18.8%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
pyarabic
Basic Info
- Host: GitHub
- Owner: linuxscout
- License: gpl-3.0
- Language: Python
- Default Branch: master
- Size: 1.23 MB
Statistics
- Stars: 463
- Watchers: 36
- Forks: 88
- Open Issues: 14
- Releases: 4
Topics
Metadata Files
README.md
PyArabic
A specific Arabic language library for Python, provides basic functions to manipulate Arabic letters and text, like detecting Arabic letters, Arabic letters groups and characteristics, remove diacritics etc.
مكتبة برمجية للغة العربية بلغة بيثون، توفر دوالا للتحكم في الحروف والنصوص، مثلا تحديد نوع الحرف، حذف الحركات، مقارنة التشكيل.
Developpers: Taha Zerrouki: http://tahadz.com taha dot zerrouki at gmail dot com
Features | value ---------|--------------------------------------------------------------------------------- Authors | Taha Zerrouki: http://tahadz.com, taha dot zerrouki at gmail dot com Release | 0.6.12 License |GPLv3 Tracker |linuxscout/pyarabic/Issues Website |https://pypi.python.org/pypi/pyarabic Doc |package Documentaion Source |Github Download |pypi.python.org Feedbacks |Comments Accounts |@Twitter @Sourceforge
Citation
Zerrouki, T., (2023). PyArabic: A Python package for Arabic text. Journal of Open Source Software, 8(84), 4886, https://doi.org/10.21105/joss.04886
T. Zerrouki, Pyarabic, An Arabic language library for Python, https://pypi.python.org/pypi/pyarabic/, 2010
``` or in bibtex format
bibtex
@article{Zerrouki2023,
title = {PyArabic: A Python package for Arabic text},
author = {Taha Zerrouki},
year = 2023,
journal = {Journal of Open Source Software},
publisher = {The Open Journal},
volume = 8,
number = 84,
pages = 4886,
doi = {10.21105/joss.04886},
url = {https://doi.org/10.21105/joss.04886}
}
or
bibtex
@misc{zerrouki2012pyarabic,
title={pyarabic, An Arabic language library for Python},
author={Zerrouki, Taha},
url={https://pypi.python.org/pypi/pyarabic,
year={2010}
}
مزايا
- تصنيف الحروف
- تفريق النص إلى وحدات (جمل أو كلمات)
- حذف الحركات:( كل الحركات، الحركات عدا الشدة، حذف الشدة، حذف التطويل، حذف الحركة الأخيرة)
- فصل الحركات عن النصوص وإدماجها
- اختزال التشكيل
- قياس التماثل بين كلمتين ( في الحركات جزئيا وكليا، التماثل مع وزن)
- تنميط الحروف ( توحيد التراكيب مثل لام الألف، والهمزات)
- تحويل الأعداد إلى كلمات
- استخلاص العبارات العددية من النص
- تشكيل أولي للعبارات العددية
- قلب النصوص العربية للأنظمة التي لا تدعم تشبيك الحروف
Features
- Arabic letters classification
- Text tokenization into words or sentences
- Strip Harakat ( all, except Shadda, tatweel, last_haraka)
- Sperate and join Letters and Harakat
- Reduce tashkeel
- Mesure tashkeel similarity ( Harakats, fully or partially vocalized, similarity with a template)
- Letters normalization ( Ligatures and Hamza)
- Numbers to words
- Extract numerical phrases
- Pre-vocalization of numerical phrases
- Unshiping texts
Applications
- Arabic text processing
Installation
pip install pyarabic
Usage
python
import pyarabic.araby as araby
import pyarabic.number as number
Package Documentation
https://pyarabic.readthedocs.io/
Files
- file/directory category description
- araby.py: arabic routins.
- named.py: handle named enteties recognation.
- unshape.py: unshaping arabic text
وصف
مكتبة بيثون للعربيةPyArabic مكتبة برمجية تجمع في طياتها خصائص ووظائف يحتاجها المبرمج للتعامل مع النصوص العربية، وهي مستوحاة من مكتبة بي أتش بي العربية لصديقنا خالد الشمعة، التي تستهدف توفير مصدر مفتوح لكثير من وظائف النصوص العربية لاستعمالها في مجال النشر في الإنترنت.
تعريف نص عربي
أفضل طريقة للتعامل مع النصوص العربية بلغة بيثون هو استخدام الترميز يونيكود، التي يدعمها بيثون دعما أصليا، لا حاجة فيه إلى مكتبات خارجية أو دوال خاصة، وقد يكون هذا أهمّ ما دفعني لاختيار لغة بيثون، إذ يكفي أن تسبق النص بحرف يو u لتدع بيثون يريحك من عناء التفكير وبرمجة النصوص، ويعامل معها بشفافية عالية.
تعريف نص عربي بترميز يونيكود
python
text = u'الإسلام ديننا'
اختيار ترميز ملف المتن. ``` #!/usr/bin/env python
-- coding: utf-8 --
```
عرض النص العربي في المخرج
print text.encode('utf8')
اسم المكتبة pyarabic فيها العديد من الوظائف المجمعة في وحدات:
فيها العديد من الوظائف المجمعة في وحدات: * وحدة : araby.py وفيها الثوابت كالحروف وأسمائها ومجموعاتها والوظائف العامة كحذف الحركات وحذف التطويل ومقارنة التشكيل بين الكلمات، وضبط علامات الترقيم. * وحدة الأعداد number.py : وفيها وظائف تحويل الأعداد إلى كلمات والكلمات إلى أعداد، كشف ألفاظ الأعداد في النص، وتشكيلها. * وحدة المسميات : named.py وفيها وظائف لكشف الأسماء والمسميات في النص.
وحدة الوظائف العامة araby
يمكن استدعاؤها بالأمر
python
Import pyarabic.araby as araby
وسنستعمل الاختصار araby فيما بعد الثوابت العامة في مكتبة عربي: تضم الحروف العربية ومجموعاتها المختلفة وبعض الأنماط المستخدمة لاحقا في وظائف مختلفة 1- الحروف العربية الأساسية مع تسميات لاتينية لاستعمالها في البرمجة
The arabic chars contains all arabic letters, a sub class of unicode,
python
COMMA = u'\u060C'
SEMICOLON = u'\u061B'
QUESTION = u'\u061F'
HAMZA = u'\u0621'
ALEF_MADDA = u'\u0622'
ALEF_HAMZA_ABOVE = u'\u0623'
المزيد في ملف araby.py
تضم مجموعة الحروف العربية الحروف الأساسية، والحركات والأرقام، وعلامات الترقيم، وبعض الحروف الخاصة كالألف الخنجرية والياء الصغيرة، و لامات الألف بأشكالها.
مجموعات الأحرف:
ويمكن تقسيم الحروف في مجموعات وتصنيفات نستعملها فيما بعد في الوظائف المختلفة
الاسم العربي | وصف المجموعة | عناصرها --------|--------------|------------ الحروف | مجموعة الحروف العربية دون حركات | LETTERS = u'ابتةثجحخدذرزسشصضطظعغفقكلمنهويءآأؤإئ' التشكيل | مجموعة الحركات مع الشدة مدرجة | TASHKEEL =(FATHATAN, DAMMATAN, KASRATAN, FATHA,DAMMA,KASRA, SUKUN, SHADDA) الحركات | مجموعة الحركات دون الشدة مدرجة | HARAKAT =( FATHATAN, DAMMATAN, KASRATAN, FATHA, DAMMA, KASRA, SUKUN); الحركات القصيرة | الحركات القصيرة دون تنوين | SHORTHARAKAT =( FATHA, DAMMA, KASRA, SUKUN); التنوين | حركات التنوين | TANWIN =(FATHATAN, DAMMATAN, KASRATAN); المركبات | لامات الألف في أشكالها المختلفة | LIGUATURES = (u'ﻻ', u'ﻷ', u'ﻹ', u'ﻵ') الهمزات | الهمزة في أشكالها المختلفة | HAMZAT = (u'ء', u'ؤ', u'ئ', u'ٔ', u'ٕ', u'إ', u'أ') الألفات | الألف في أشكالها المختلفة | ALEFAT = (u'ا', u'آ', u'أ', u'إ', u'ٱ', u'ى', u'ٰ') حروف العلة | الياء والواو والألف | WEAK = (u'ا', u'و', u'ي', u'ى') الياءات | ما يرسم مثل الياء، الصغيرة منها، والألف المقصورة والهمزة على النبرة | YEHLIKE = (u'ي', u'ئ', u'ى', u'ۦ') الواوات | ما يرسم مثل الواو | WAWLIKE = (u'و', u'ؤ', u'ۥ') التاءات | التاء المربوطة والمفتوحة | TEHLIKE = (u'ت', u'ة') الحروف الصغيرة | الألف والياء والواو الصغار | SMALL = (u'ٰ', u'ۥ', u'ۦ') الحروف القمرية | الحروف القمرية | MOON = (u'ء', u'آ', u'أ', u'إ', u'ا', u'ب', u'ج', u'ح', u'خ', ... الحروف الشمسية | الحروف الشمسية | SUN = (u'ت', u'ث', u'د', u'ذ', u'ر', u'ز', u'س', u'ش', u'ص', u... ترتيب الحروف العربية | يعطي لكل حرف عربي رقما ترتيبيا فالألف واحد والباء اثنان والهمزة 29. | AlphabeticOrder = {u'ء': 29, u'آ': 29, u'أ': 29, u'ؤ': 29, u'إ... أسماء الحروف | يعطي كل حرف اسمه العربي | NAMES = {u'ء': u'همزة', u'آ': u'ألف ممدودة', u'أ': u'همزة على ...
الوظائف- الدوال
أهم الوظائف
وصف الدالة |الدالة ------|------------ حذف الحركات كلها بما فيها الشدة|striptashkeel(text) حذف الحركات كلها ماعدا الشدة|stripharakat(text) حذف الحركة الأخيرة|striplastharaka(text) حذف التطويل| striptatweel(text) تنميط أشكال الهمزة المختلفة | normalizehamza(text) تفريق كلمات النص |tokenize(text) تفريق جمل النص |sentencetokenize(text)
طالع الوظائف والأمثلة في ملف المزايا
Owner
- Name: Taha Zerrouki (طه زروقي )
- Login: linuxscout
- Kind: user
- Location: Bouira, Algeria
- Company: Bouira University
- Website: tahadz.com
- Twitter: linuxscout
- Repositories: 22
- Profile: https://github.com/linuxscout
PhD, Computer Science Professor, Interest : Arabic Natural Language processing
JOSS Publication
PyArabic: A Python package for Arabic text
Tags
Arabic Language Natural Language Processing Text PreprocessingCitation (CITATION.cff)
abstract: A specific Arabic language library for Python, provides basic functions to manipulate Arabic letters and text, like detecting Arabic letters, Arabic letters groups and characteristics, remove diacritics etc.
authors:
- family-names: Zerrouki
given-names: Taha
cff-version: 1.0.0
message: If you use this software, please cite it using these metadata.
title: pyarabic, An Arabic language library for Python.
GitHub Events
Total
- Issues event: 2
- Watch event: 26
- Issue comment event: 1
- Fork event: 6
Last Year
- Issues event: 2
- Watch event: 27
- Issue comment event: 1
- Fork event: 6
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| linuxscout | t****i@h****m | 109 |
| mouhamadaboshokor | m****r@g****m | 4 |
| David D Lowe | d****m@g****m | 3 |
| Odai Alghamdi | p****y@h****t | 3 |
| ahmed | a****3@g****m | 2 |
| Ali Hamdi Ali Fadel | A****7@g****m | 1 |
| Ibrahim.H | b****s@y****r | 1 |
| KHALDOUN Mohsen | m****1@h****m | 1 |
| LBenzahia | l****a@g****m | 1 |
| Maz Jaleel | m****l@g****m | 1 |
| Muhammad Al-Barham | m****8@g****m | 1 |
| Souhaib | s****y@g****m | 1 |
| Waleed Mustafa Awad | s****a@z****g | 1 |
| Watheq Alshowaiter | w****r@g****m | 1 |
| Youssef Sherif | s****f@a****u | 1 |
| et | b****7@a****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 51
- Total pull requests: 26
- Average time to close issues: 4 months
- Average time to close pull requests: 6 months
- Total issue authors: 36
- Total pull request authors: 20
- Average comments per issue: 2.14
- Average comments per pull request: 0.85
- Merged pull requests: 19
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 0
- Average comments per issue: 0.5
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- linuxscout (12)
- Flimm (4)
- Marwa-Hashem (1)
- Hako-Ben (1)
- Rawabi20 (1)
- aimanmutasem (1)
- OWaheed (1)
- e-lobo (1)
- tahoar (1)
- klanjabrik (1)
- mamprogr (1)
- geohadab (1)
- WatheqAlshowaiter (1)
- tbarkai (1)
- meedawi (1)
Pull Request Authors
- mohsenuss91 (4)
- Flimm (3)
- ahmedelq (2)
- greenat92 (1)
- WatheqAlshowaiter (1)
- mohammad-albarham (1)
- bitsnaps (1)
- wmustafaAwad (1)
- mAboshokor (1)
- OdaiGH (1)
- assem-ch (1)
- munzirtaha (1)
- msis (1)
- arfon (1)
- irushchyshyn (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 267,103 last-month
- Total dependent packages: 7
- Total dependent repositories: 34
- Total versions: 18
- Total maintainers: 1
pypi.org: pyarabic
Arabic text tools for Python
- Homepage: http://pyarabic.sourceforge.net/
- Documentation: https://pyarabic.readthedocs.io/
- License: GPL
-
Latest release: 0.6.15
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- six >=1.14.0
- six >=1.14.0
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v2 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
