Words with prefixes and suffixes
وبكتابهم وجدنا الحلَّ، فسيكتبونها للطلاب غداً.
Notice that «وبكتابهم» and «فسيكتبونها» each count as one word by whitespace, while each carries several units. Try showing the segmentations.
Open in toolExamples
Short texts chosen to show a specific linguistic phenomenon: clitics, hamzas, dialects, numbers, negation, simple sentences and difficult constructions. Open any example in its tool to see the result.
وبكتابهم وجدنا الحلَّ، فسيكتبونها للطلاب غداً.
Notice that «وبكتابهم» and «فسيكتبونها» each count as one word by whitespace, while each carries several units. Try showing the segmentations.
Open in toolأطلقنا اليوم #مختبر_اللغة 🎉 التفاصيل على https://dlarabic.com/nlp-lab/ وراسلونا على info@example.com
The lab classifies each token: hashtag, emoji, link, email, Arabic word.
Open in toolقدّم د. علي ورقته يوم ٢٠٢٤/٠٥/١٢ الساعة 10:30 أمام 3.5 آلاف مشارك.
The sentence should not be split at «د.» or at the decimal point in 3.5.
Open in toolDr. Smith didn't arrive. The U.S. team won 3-1! Wasn't that great?
Abbreviations such as Dr. and U.S. must not end a sentence.
Open in toolكتب كاتب كتاب كتابة مكتوب مكتبة مكتبات كاتبون كاتبات يكتبون تكتب نكتب الكتاب الكتابة المكتبة
Enter this text in BPE mode with 15 merges and watch «كت», then «كتا», then «كتاب» appear.
Open in toolالخَيْلُ وَاللّيْلُ وَالبَيْداءُ تَعرِفُني ... وَالسّيفُ وَالرّمحُ وَالقرْطاسُ وَالقَلَمُ
A line by al-Mutanabbi (4th century AH, public domain). Try removing the diacritics and compare the length of the text before and after.
Open in toolجمييييل جداااا 😍😍 الـــمـــطعم هذا!!! ١٠/١٠ أنصح فيه
Tatweel, repeated letters, emojis, Eastern Arabic digits, repeated punctuation.
Open in toolأحمد وإبراهيم وآمنة ذهبوا إلى المدرسة الابتدائية في مدينة الكوفه، وقالوا: هذى مسألة سهلة
Compare the hamza unification policies, and notice the effect of «ى→ي» and «ة→ه» on «إلى» and «مسألة».
Open in toolگالي: چان ماكو وقت، روح ويّا صديقك وجيب الکتاب
The Persian letters option changes «ک» to «ك». It turns «گ» and «چ» into «ك» and «ج», which helps search but erases a sound distinction in the dialect.
Open in toolOMG!!! This is sooooo GOOD 😂😂 visit http://example.com NOW!!! 100% recommended
Try lowercase, punctuation, URL cleaning and repetition reduction.
Open in toolكتب كاتب الكاتبون مكتوب مكتبة المكتبات كتابة يكتبون استكتب
Compare Light10 (which removes affixes) with ISRI (which tries to reach the root).
Open in toolوبالمعلمين فسيكتبونها والمدرستان لمكتباتهم وسنعلمهم
Notice the effect of the minimum stem length in Light10.
Open in toolعلم ذهب وجد عين فصل
Each word here allows more than one analysis without diacritics. The tool does not choose a single analysis without context.
Open in toolقال يقول وعد يعد رمى يرمي مدّ استمرار
Pattern algorithms stumble on weak and doubled letters; notice the confidence of the results.
Open in toolrunning runs runner connected connection connections happily studies
The lab uses a small rule-based English stemmer for illustration, not the full Porter algorithm.
Open in toolكتب الطالب الدرس في المكتبة.Open in tool
العلم نور والجهل ظلام.Open in tool
هو لم يذهب إلى الجامعة لأنه كان مريضاً.Open in tool
ذهب الرجل يبحث عن الذهب في الجبل.
The word «ذهب» is once a verb and once a noun. Notice how the lab uses «ال» as evidence of a noun.
Open in toolThe young researcher quickly wrote a new paper about Arabic dialects.Open in tool
زار الدكتور أحمد الساعدي جامعة بغداد يوم الأحد 12 أيار 2024 والتقى رئيس الجامعة في الساعة 10:30 صباحاً.
Try the extraction methods one at a time: patterns, lists, trigger words.
Open in toolانطلقت القافلة من البصرة مروراً بالناصرية والكوت ووصلت إلى الموصل ثم أربيل.
Notice «بالناصرية» being caught after the ب is separated.
Open in toolأعلنت وزارة التعليم العالي والبحث العلمي تخصيص 250 مليون دينار لدعم 40 مشروعاً بحثياً بنسبة 15%.Open in tool
للاستفسار راسلوا info@example.org أو زوروا https://example.org/contact أو اتصلوا على +964 770 000 0000
The numbers here are a clearly fake example (zeros).
Open in toolOn Monday, Dr. Sarah Lee from the University of Oxford met officials in Baghdad and London.Open in tool
الخدمة ممتازة والموظفون لطفاء جداً، تجربة رائعة وأنصح بها.Open in tool
التطبيق بطيء ومليء بالأخطاء، تجربة سيئة ومخيبة.Open in tool
المكان ليس جميلاً، والطعام لم يكن لذيذاً، لكن السعر مناسب.
Notice how a negation particle flips the effect of the next word, and how the result of each sentence differs.
Open in toolالأكل كلش طيب والمكان خوش، بس الخدمة مو زينة.
Dialect words in the lexicon: كلش (intensifier), خوش, زين, مو (negation).
Open in toolيا سلام! انقطعت الكهرباء للمرة العاشرة اليوم، شيء رائع فعلاً.
An example of the limits of the lexicon method: «رائع» ("wonderful") counts as positive even though the meaning is negative.
Open in toolThe camera is excellent, but the battery is terrible and it's not cheap.Open in tool
كيف حالك؟ أنا متعب جداً اليوم وأريد أن أذهب إلى البيت الآن.
The same sentence in eight versions: compare the indicative words (now, very, I want) in each dialect. Written for the lab; needs review by a native speaker.
Open in toolشلونك؟ آني كلش تعبان اليوم وأريد أروح للبيت هسه.
The same sentence in eight versions: compare the indicative words (now, very, I want) in each dialect. Written for the lab; needs review by a native speaker.
Open in toolإزيك؟ أنا تعبان أوي النهارده وعايز أروح البيت دلوقتي.
The same sentence in eight versions: compare the indicative words (now, very, I want) in each dialect. Written for the lab; needs review by a native speaker.
Open in toolشلونك؟ أنا وايد تعبان اليوم وأبي أروح البيت الحين.
The same sentence in eight versions: compare the indicative words (now, very, I want) in each dialect. Written for the lab; needs review by a native speaker.
Open in toolكيفك؟ أنا كتير تعبان اليوم وبدي روح ع البيت هلق.
The same sentence in eight versions: compare the indicative words (now, very, I want) in each dialect. Written for the lab; needs review by a native speaker.
Open in toolلاباس عليك؟ أنا عيان بزاف اليوم وبغيت نمشي للدار دابا.
The same sentence in eight versions: compare the indicative words (now, very, I want) in each dialect. Written for the lab; needs review by a native speaker.
Open in toolواش راك؟ راني عيان بزاف اليوم وحاب نروح للدار درك.
The same sentence in eight versions: compare the indicative words (now, very, I want) in each dialect. Written for the lab; needs review by a native speaker.
Open in toolشنحوالك؟ آنا تعبان برشا اليوم ونحب نروح للدار توا.
The same sentence in eight versions: compare the indicative words (now, very, I want) in each dialect. Written for the lab; needs review by a native speaker.
Open in toolكتبَ الطالبُ الدرسَ
A hand-parsed tree.
Open in toolذهبَ أحمدُ إلى الجامعةِ
The preposition attaches to the noun it governs with the case relation, and that noun attaches to the verb with the obl relation.
Open in toolقرأتِ الطالبةُ كتاباً مفيداًOpen in tool
العلمُ نورٌ
In UD, the predicate is the root of a nominal sentence, and the subject depends on it with the nsubj relation.
Open in toolبابُ البيتِ مفتوحٌ
The second term of the idafa attaches to the first with the nmod relation.
Open in toolسافرَ الطبيبُ والمهندسُ إلى بغدادَ
In UD, the second conjunct attaches to the first with the conj relation, and the conjunction attaches to the second conjunct with the cc relation.
Open in toolيدرسُ الطلابُ في المكتبةِ الكبيرةِOpen in tool
لم يحضرِ المديرُ الاجتماعَ
The negation particle «لم» is tagged PART and attaches to the verb with the advmod relation, as in the UD_Arabic-PADT treebank.
Open in toolThe student wrote the lessonOpen in tool
She reads a useful book in the libraryOpen in tool
ملك رجل امرأة
With the teaching vectors this gives «ملكة» ("queen") because the dimensions were designed for it. With trained vectors the result is less regular.
Open in toolطبيبOpen in tool
بغداد العراق القاهرة
Iraq − Baghdad + Cairo ≈ Egypt in the teaching dimensions.
Open in toolking man womanOpen in tool
الطبيب والممرضة في المستشفى
Jaccard is low because the words differ, while semantic similarity with the teaching vectors is high because «طبيب/دكتور» and «مستشفى/مستوصف» are close in them.
Open in toolذهب الطلاب إلى المكتبات
Stemming and character n-grams raise the lexical similarity here.
Open in toolأحب هذا الفيلم كثيراً
High lexical and semantic similarity despite the opposite opinions: a known limitation.
Open in toolمكتبه
The Levenshtein distance between «مكتبه» and «مكتبة» = 1.
Open in toolThe cat sat on the matOpen in tool
الطالب يقرأ الكتاب في المكتبة
Notice that the word order in the output is Arabic, not English.
Open in toolكتب الباحث بحثاً جديداً
The verb comes first in Arabic and the subject first in English. And «كتب» without diacritics may be a verb or the plural of «كتاب», and the dictionary does not see the context, so it picks the first recorded meaning.
Open in toolthe new student reads a big book
The adjective comes after the noun in Arabic.
Open in toolضرب عصفورين بحجر
Translating the words one by one does not give the idiomatic meaning (to kill two birds with one stone).
Open in toolتواجه معالجة اللغة العربية تحديات خاصة لا تظهر بالدرجة نفسها في الإنجليزية. أول هذه التحديات غياب التشكيل في أغلب النصوص، مما يجعل الكلمة الواحدة تحتمل عدة قراءات. والتحدي الثاني غنى الصرف العربي، إذ تُشتق من الجذر الواحد عشرات الكلمات بأوزان مختلفة. كما تلتصق حروف العطف والجر والضمائر بالكلمة، فتحتاج الأنظمة إلى تجزئة دقيقة قبل التحليل. ويزيد تعدد اللهجات من صعوبة المهمة، لأن النصوص المنشورة على الإنترنت تخلط الفصحى باللهجات. وقد ساعدت النماذج المدربة مسبقاً مثل AraBERT وCAMeLBERT وMARBERT على تحسين النتائج في كثير من المهام. لكن الموارد الموسومة لبعض اللهجات ما زالت قليلة، وهذا يجعل بناء مدونات جديدة أولوية بحثية.
A text written for the lab. Try TF-IDF and TextRank with two sentences and compare the choice.
Open in toolبدأت الترجمة الآلية مبكراً في تاريخ الحوسبة. ففي عام 1954 عرضت جامعة جورجتاون وشركة IBM تجربة ترجمت فيها عشرات الجمل من الروسية إلى الإنجليزية. وبعد سنوات من التفاؤل، صدر تقرير ALPAC عام 1966 فانتقد بطء التقدم، فتراجع التمويل. ثم ظهرت في التسعينيات الترجمة الإحصائية التي تتعلم من نصوص متوازية بدلاً من القواعد المكتوبة يدوياً. وفي منتصف العقد الثاني من هذا القرن انتقلت الأنظمة إلى الشبكات العصبية. وأصبحت معمارية Transformer التي نُشرت عام 2017 أساس أغلب أنظمة الترجمة الحديثة. وما زالت الترجمة من اللهجات العربية وإليها أصعب من الترجمة من الفصحى بسبب قلة البيانات.
A text written for the lab from well-known historical facts.
Open in toolينبع نهرا دجلة والفرات من مرتفعات تركيا ويجريان نحو الجنوب الشرقي. يمر الفرات في سوريا قبل أن يدخل العراق، بينما يدخل دجلة العراق من الشمال. وتقع بغداد على ضفتي دجلة، وتقع مدن مثل الرمادي والفلوجة على الفرات. ويلتقي النهران في جنوب العراق قرب القرنة ليكوّنا شط العرب. ويصب شط العرب في الخليج العربي بعد أن يمر بمدينة البصرة. وقد قامت على ضفاف النهرين حضارات قديمة عديدة في بلاد الرافدين.
A short geographical text written for the lab.
Open in toolTokenization is the first step in most NLP pipelines. Early systems split text on spaces and punctuation, which works reasonably well for English. Languages with rich morphology, such as Arabic and Turkish, produce very large vocabularies under this approach. Subword methods such as BPE and WordPiece address this problem by learning frequent character sequences from a corpus. Modern transformer models rely on these subword vocabularies, which typically contain tens of thousands of units. The choice of tokenizer affects model size, speed and accuracy, especially for under-resourced languages.
Original paragraph written for the lab.
Open in toolوقال المُعلِّمونَ: إنّ المكتبـــات الجديدة رائعة جداً!! 😊 زوروها في ٢٠٢٤
A pipeline suited to a search system: cleaning, then normalization, then stopword removal, then light stemming.
Open in toolالمطعم مو زين أبداً 😡 بس الموظفين كلش لطفاء!!!
We neither remove stopwords nor stem, so we do not lose negation and intensifiers.
Open in toolشلونك عيني؟ شكو ماكو؟ هسه وصلت من الدوام وكلش تعبان.
Iraqi words: شلون, عيني, شكو ماكو, هسه, الدوام, كلش.
Open in toolبيش هذا الكيلو؟ هواية غالي، نزّل شوية بالسعر.
بيش = how much, هواية = a lot, شوية = a little.
Open in toolباچر الصبح نروح ويّا خالي للجامعة، بس إذا ماكو زحمة.
باچر = tomorrow, ويّا = with, ماكو = there is no.
Open in toolليش ما جيت البارحة؟ وين چنت؟ شنو صار؟
ليش = why, وين = where, چنت = I was, شنو = what.
Open in toolNo examples match this search.
Sections
No section has this name. Press “Search” to search all site content.
Favourites
My results & certificates
My academy progressMy quiz resultsKids’ progressAcademy certificatesQuiz certificatesStart any lesson or quiz and it will show up here so you can get back to it quickly.
Settings
I am the NLP Lab assistant. Ask me about a concept, an algorithm or a dialect word, and I will answer from the lab's knowledge base, citing the sources.
It answers from the lab's knowledge base only, without an external language model and without sending your question anywhere.
The assistant can make mistakes, so check the attached sources.