Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Build Arabic NLP preprocessing pipelines with comprehensive documentation
description_ar
بناء خطوط معالجة اللغة الطبيعية العربية مع توثيق شامل
category
developer
language
ar
dialect
msa
rtl
true
platform_claude
true
platform_gpt
true
platform_qwen
true
platform_jais
true
platform_falcon
true
platform_allam
true
compliance
[]
version
1.0.0
author
salman-shaikh
contributor_volunteer
true
الهدف (Purpose)
يساعد هذه المهارة في بناء خطوط معالجة اللغة الطبيعية (NLP Pipelines) للغة العربية مع توثيق شامل، يتضمن التطبيع، التجزئة (Tokenization)، إزالة stopwords، والتشكيل، مع دعم اللهجات العربية المختلفة.
defremove_stopwords(tokens, custom_stopwords=None):
stopwords = set(ARABIC_STOPWORDS)
if custom_stopwords:
stopwords.update(custom_stopwords)
return [t for t in tokens if t notin stopwords]
٦. التجذيع (Stemming/Lemmatization)
٦.١ الجذاعة vs اللممة
النوع
الوصف
مثال
Stemming
إزالة اللواحق والزوائد
"ويكتبون" → "كتب"
Lemmatization
إرجاع للأصل المعجمي
"ويكتبون" → "كتب" (فعل)
٦.٢ الكود
from camel_tools.morphology import analyzer
deflemmatize_arabic(tokens):
lemmas = []
for token in tokens:
# استخدام CAMeL Tools لللممة
analysis = analyzer.analyze(token)
if analysis:
lemmas.append(analysis[0].lemma)
else:
lemmas.append(token)
return lemmas
٧. خط المعالجة الكامل
٧.١ الكود الكامل
classArabicNLPipeline:
def__init__(self, config=None):
self.config = config or {
'normalize': True,
'clean': True,
'remove_tashkeel': True,
'remove_stopwords': True,
'lemmatize': False,
'dialect': 'all'
}
defprocess(self, text):
ifself.config['clean']:
text = clean_arabic_text(text)
ifself.config['normalize']:
text = normalize_arabic(text)
ifself.config['remove_tashkeel']:
text = remove_tashkeel(text)
tokens = tokenize_arabic(text)
ifself.config['remove_stopwords']:
tokens = remove_stopwords(tokens)
ifself.config['lemmatize']:
tokens = lemmatize_arabic(tokens)
return tokens
defprocess_batch(self, texts):
return [self.process(t) for t in texts]