Majid Al-RaimiIntroduction to natural language processingمقدمة في معالجة اللغات الطبيعية (NLP)

ICS 582Lecture 01المحاضرة 01

Introduction to natural language processingمقدمة في معالجة اللغات الطبيعية (NLP)

What NLP is and where it sits between linguistics, computer science and AI, the applications that run it at scale (translation, question answering, spelling, information extraction, sentiment), the four families of approaches and the levels of linguistic knowledge they must capture, and why ambiguity and the messiness of real language make the problem hard.ما هي معالجة اللغات الطبيعية (NLP) وأين تقع بين اللسانيات وعلوم الحاسب والذكاء الاصطناعي، والتطبيقات التي تعتمد عليها على نطاق واسع (الترجمة، والإجابة عن الأسئلة، والتدقيق الإملائي، واستخراج المعلومات، وتحليل المشاعر)، والعائلات الأربع من المناهج ومستويات المعرفة اللغوية التي يجب أن تلتقطها، ولماذا يجعل الغموض وفوضى اللغة الحقيقية المشكلة صعبة.

Partsالأجزاء
4
Conceptsالمفاهيم
16
Slidesالشرائح
25
Readingمدة القراءة
96 min96 دقيقة
Understoodما فهمته
0/16 conceptsمفاهيم
Read the full guideاقرأ الشرح الكاملEvery part on one long page: 4 parts, 16 concepts, about 96 min.كل الأجزاء في صفحة واحدة طويلة: 4 أجزاء، و16 مفهومًا، في نحو 96 دقيقة.

AOverviewنظرة عامة

This lecture draws the map that every later lecture in the course fills in. It starts with a wall of company logos and a one-sentence definition, and it ends with four ordinary words, I made her duck, that carry five meanings. Between the two lies the whole shape of natural language processing: what the field is for, what it ships, how it is built, and why language refuses to make the building easy.

ترسم هذه المحاضرة الخريطة التي تملؤها كل محاضرة لاحقة في المقرر. تبدأ بجدار من شعارات الشركات وبتعريف من جملة واحدة، وتنتهي بأربع كلمات عادية هي I made her duck تحمل خمسة معانٍ. وبين البداية والنهاية يقع الشكل الكامل لمعالجة اللغات الطبيعية (NLP): ما الغاية من هذا المجال، وما المنتجات التي يقدمها، وكيف تُبنى أنظمته، ولماذا ترفض اللغة أن تجعل هذا البناء سهلًا.

As a PhD student you need it for three reasons. The exam questions on this material are definitional and list-shaped: the definition and its three goals, the three names of the field, the five AI subfields, the four approaches, the levels of linguistic knowledge from phonetics to discourse, the five readings of the duck sentence, the six sources of difficulty and the three tools for progress. Your research will have to state, in the introduction of any paper or thesis chapter, which level a task lives at and whether the knowledge at that level is coded by hand or learned from data, and if that research touches Arabic it inherits the difficulties this lecture names (diglossia, clitics, no capital letters). And any real system you build or review is a chain of components in which every link resolves an ambiguity and every link can be wrong.

تحتاج هذه المحاضرة بصفتك طالب دكتوراه لثلاثة أسباب. أولًا، أسئلة الامتحان على هذه المادة تعريفية وعلى شكل قوائم: التعريف وأهدافه الثلاثة، والأسماء الثلاثة للمجال، وفروع الذكاء الاصطناعي الخمسة، والمناهج الأربعة، ومستويات المعرفة اللغوية من علم الأصوات (phonetics) إلى الخطاب (discourse)، والقراءات الخمس لجملة duck، والمصادر الستة للصعوبة، والأدوات الثلاث للتقدم. ثانيًا، سيتعين على بحثك أن يحدد، في مقدمة أي ورقة بحثية أو فصل من الأطروحة، في أي مستوى تقع المهمة، وهل المعرفة في ذلك المستوى مكتوبة يدويًا أم متعلَّمة من البيانات، وإذا لمس بحثك اللغة العربية فإنه يرث الصعوبات التي تسميها هذه المحاضرة (الازدواجية اللغوية diglossia، والسوابق واللواحق المتصلة clitics، وغياب الحروف الكبيرة). ثالثًا، أي نظام حقيقي تبنيه أو تراجعه هو سلسلة من المكونات، كل حلقة فيها تحسم غموضًا ما، وكل حلقة فيها قد تخطئ.

From a definition to ambiguity resolution: the lecture in four stopsمن التعريف إلى حسم الغموض: المحاضرة في أربع محطات

The path has four stops. You define NLP by its goal rather than its tool and place it among its parent disciplines and its sibling subfields. You turn seven product screenshots into five reusable ideas, from human-in-the-loop translation to aspect-level sentiment. You learn the one axis that separates the four approaches (who writes the knowledge, a human or the data) and the levels of linguistic knowledge that any approach must fill. Finally you watch one sentence fork into five readings and see that most of the field is choosing one of them.

للمسار أربع محطات. تعرّف NLP بغايتها لا بأداتها، وتضعها بين التخصصات الأم التي تنتمي إليها والفروع الشقيقة لها. ثم تحوّل سبع لقطات شاشة لمنتجات إلى خمس أفكار قابلة لإعادة الاستخدام، من الترجمة التي يشارك فيها الإنسان (human-in-the-loop) إلى تحليل المشاعر على مستوى الجوانب (aspect-level sentiment). ثم تتعلم المحور الوحيد الذي يفصل بين المناهج الأربعة (من يكتب المعرفة: الإنسان أم البيانات) ومستويات المعرفة اللغوية التي يجب على أي منهج أن يملأها. وأخيرًا تشاهد جملة واحدة تتفرع إلى خمس قراءات، وترى أن معظم عمل المجال هو اختيار واحدة منها.

Success looks likeعلامات النجاح

  • Recite the definition of NLP with its three goals and three alternative names, and draw the Venn of linguistics, computer science and AI with one contribution word in each circle.أن تسرد تعريف NLP مع أهدافه الثلاثة وأسمائه البديلة الثلاثة، وأن ترسم مخطط Venn الذي يجمع اللسانيات وعلوم الحاسب والذكاء الاصطناعي مع كلمة واحدة تمثل إسهام كل دائرة.
  • List the five AI subfields, place deep learning under machine learning, and name one system where NLP meets vision, robotics and knowledge representation.أن تعدد فروع الذكاء الاصطناعي الخمسة، وتضع التعلم العميق (deep learning) تحت تعلم الآلة (machine learning)، وتسمي نظامًا واحدًا تلتقي فيه NLP مع الرؤية الحاسوبية والروبوتات وتمثيل المعرفة.
  • Name the NLP task hiding behind any product, from the sense disambiguation inside an answer box to the template filling behind a calendar entry.أن تسمي مهمة NLP المختبئة خلف أي منتج، من توضيح معنى الكلمة (sense disambiguation) داخل مربع الإجابة إلى ملء القوالب (template filling) خلف إدخال في التقويم.
  • Contrast the four approaches on one axis, what a human writes versus what the data supplies, with one strength and one weakness each.أن تقارن بين المناهج الأربعة على محور واحد، ما يكتبه الإنسان مقابل ما توفره البيانات، مع نقطة قوة واحدة ونقطة ضعف واحدة لكل منهج.
  • Order the levels of linguistic knowledge from phonetics to discourse, say which apply to speech only, and place any task at its level.أن ترتب مستويات المعرفة اللغوية من علم الأصوات (phonetics) إلى الخطاب (discourse)، وتذكر أيها يخص الكلام المنطوق فقط، وتضع أي مهمة في مستواها.
  • Produce five readings of I made her duck, name the level of ambiguity behind each, and bracket both attachments of a prepositional phrase.أن تستخرج خمس قراءات لجملة I made her duck، وتسمي مستوى الغموض خلف كل قراءة، وتضع الأقواس لكلا احتمالي ارتباط شبه الجملة الحرفية (prepositional phrase attachment).
  • List the six sources of difficulty beyond ambiguity with the subproblem each defeats, and state the three tools and three disciplines that make progress possible.أن تعدد المصادر الستة للصعوبة غير الغموض مع المشكلة الفرعية التي يُفشلها كل مصدر، وتذكر الأدوات الثلاث والتخصصات الثلاثة التي تجعل التقدم ممكنًا.

How to study this lectureكيف تذاكر هذه المحاضرة

  1. Choose your route. Read the full guide in one sitting for the big picture, or work through one part at a time when you want depth.اختر طريقك. اقرأ الدليل الكامل في جلسة واحدة لترى الصورة الكبيرة، أو ادرس جزءًا واحدًا في كل مرة حين تريد التعمق.
  2. Answer every recall prompt in your head, or on paper, before you reveal it. The lists in this lecture only stick if you retrieve them, and the five readings of the duck sentence are worth attempting cold.أجب عن كل سؤال استرجاع في ذهنك، أو على الورق، قبل أن تكشف الإجابة. القوائم في هذه المحاضرة لا تثبت إلا إذا استرجعتها بنفسك، والقراءات الخمس لجملة duck تستحق أن تحاول استخراجها دون أي تحضير.
  3. Take each quiz and read the explanation even when you are right. The explanations carry the distinctions an examiner probes, such as stemming against lemmatization or semantics against pragmatics.حلّ كل اختبار قصير واقرأ الشرح حتى عندما تكون إجابتك صحيحة. الشروح تحمل الفروق التي يختبرها الممتحن، مثل التجذيع (stemming) مقابل التأصيل المعجمي (lemmatization)، أو الدلالة (semantics) مقابل التداولية (pragmatics).
  4. Use the simulators: run a paragraph through the pipeline stepper, fill the email template, and cycle the duck sentence through its readings. Seeing a decision go wrong is faster than reading that it can.استخدم المحاكيات: مرّر فقرة عبر خطوات خط المعالجة (pipeline)، واملأ قالب البريد الإلكتروني، وتنقّل بجملة duck بين قراءاتها. أن ترى قرارًا يخطئ أمامك أسرع من أن تقرأ أنه قد يخطئ.
  5. Mark a concept as understood only when you could explain it to a classmate without looking. Unmarked concepts show you where to return.لا تضع على مفهوم علامة "فهمته" إلا عندما تستطيع شرحه لزميل دون أن تنظر. المفاهيم غير المعلّمة تريك أين يجب أن تعود.
  6. Keep the glossary open for terms, and use the reference sheet for the lists, tables and the corrected slide details when you review.أبقِ مسرد المصطلحات مفتوحًا، واستخدم الورقة المرجعية للقوائم والجداول وتفاصيل الشرائح المصححة عند المراجعة.
  7. Come back after a few days and retry the recall prompts and quizzes cold. Spaced practice builds the long-term memory an exam needs.عُد بعد بضعة أيام وأعد محاولة أسئلة الاسترجاع والاختبارات القصيرة دون تحضير. التدرب المتباعد يبني الذاكرة طويلة المدى التي يحتاجها الامتحان.

Sourcesالمصادر

BThe 4 partsالأجزاء الـ4

  1. 01What natural language processing isما هي معالجة اللغات الطبيعيةThe definition of NLP, its three goals, its other names, and where it sits at the intersection of linguistics, computer science and artificial intelligence alongside the other AI subfields.تعريف NLP وأهدافها الثلاثة وأسماؤها الأخرى، وموقعها عند تقاطع اللسانيات وعلوم الحاسب والذكاء الاصطناعي إلى جانب فروع الذكاء الاصطناعي الأخرى.3 concepts3 مفاهيمSlides 1-6الشرائح 1-618 min18 دقيقة
    1. 1.1A field defined by its goal, and known by three other namesمجال يُعرَّف بهدفه، ويُعرف بثلاثة أسماء أخرى
    2. 1.2Three parent disciplines, one intersectionثلاثة تخصصات أم وتقاطع واحد
    3. 1.3Where NLP sits inside AI, and why machine learning is both sibling and toolموقع NLP داخل الذكاء الاصطناعي، ولماذا يكون تعلم الآلة أخاً وأداة في آن واحد
  2. 02Applications of NLPتطبيقات NLPFive application families with the products that ship them: fully automatic and computer-aided machine translation, web question answering before and after LLMs, spelling and grammar correction, information extraction, and aspect-level sentiment analysis.خمس عائلات من التطبيقات مع المنتجات التي تقدمها: الترجمة الآلية الكاملة والترجمة بمساعدة الحاسب، والإجابة عن الأسئلة على الويب قبل النماذج اللغوية الكبيرة (LLMs) وبعدها، وتصحيح الإملاء والقواعد، واستخراج المعلومات، وتحليل المشاعر على مستوى الجوانب (aspect-level).5 concepts5 مفاهيمSlides 7-13الشرائح 7-1330 min30 دقيقة
    1. 2.1Machine translation: fully automatic, or a tool in a translator's handsالترجمة الآلية: آلية بالكامل، أو أداة في يد المترجم
    2. 2.2Question answering: extracting one fact versus generating an answer with citationsالإجابة عن الأسئلة: استخراج حقيقة واحدة مقابل توليد إجابة مع استشهادات
    3. 2.3Spelling and grammar: non-word errors versus real-word errorsالإملاء والقواعد: أخطاء الكلمات غير الموجودة مقابل أخطاء الكلمات الحقيقية
    4. 2.4Information extraction: turning an email into calendar fieldsاستخراج المعلومات: تحويل بريد إلكتروني إلى حقول تقويم
    5. 2.5Aspect-level sentiment: the same fact can be praise or complaintتحليل المشاعر على مستوى الجانب: الحقيقة نفسها قد تكون مدحًا أو شكوى
  3. 03How NLP is done: approaches and linguistic knowledgeكيف تُنجز NLP: المناهج والمعرفة اللغويةThe four families of NLP approaches, the pipeline from paragraphs to morphemes, the levels of linguistic knowledge from phonetics to discourse, and the contrast between a machine and a child who is predisposed to acquire language.العائلات الأربع من مناهج NLP، والمسار من الفقرات وصولا إلى المورفيمات، ومستويات المعرفة اللغوية من علم الأصوات (phonetics) إلى الخطاب (discourse)، والمقارنة بين الآلة والطفل المهيأ فطريا لاكتساب اللغة.4 concepts4 مفاهيمSlides 14-19الشرائح 14-1924 min24 دقيقة
    1. 3.1Four ways to build an NLP system: who writes the knowledge, the human or the dataأربع طرق لبناء نظام NLP: من يكتب المعرفة، الإنسان أم البيانات
    2. 3.2From paragraphs to morphemes: the text processing pipelineمن الفقرات إلى المورفيمات: خط معالجة النص
    3. 3.3Levels of linguistic knowledge: from speech sounds to discourseمستويات المعرفة اللغوية: من أصوات الكلام إلى الخطاب
    4. 3.4The machine is not predisposed: why every level must be coded or learnedالآلة ليست مهيّأة فطريًا: لماذا يجب أن يُبرمج كل مستوى أو يُتعلّم
  4. 04Why NLP is hard and how progress is madeلماذا NLP صعبة وكيف يتحقق التقدمAmbiguity at every level shown through 'I made her duck', the telescope sentence and real newspaper crash blossoms, six further sources of difficulty, and the knowledge sources and disciplines that make progress possible.الغموض في كل مستوى من خلال جملة I made her duck، وجملة التلسكوب، وعناوين الصحف الحقيقية الملتبسة (crash blossoms)، وستة مصادر أخرى للصعوبة، ومصادر المعرفة والتخصصات التي تجعل التقدم ممكنا.4 concepts4 مفاهيمSlides 20-25الشرائح 20-2524 min24 دقيقة
    1. 4.1One sentence, five meanings: where ambiguity livesجملة واحدة وخمسة معانٍ: أين يكمن الغموض
    2. 4.2Ambiguity is pervasive: attachments and crash blossomsالغموض في كل مكان: الربط وعناوين crash blossoms
    3. 4.3Six more reasons language is hardستة أسباب أخرى تجعل اللغة صعبة
    4. 4.4Making progress: three tools and three parent disciplinesكيف نتقدّم: ثلاث أدوات وثلاثة تخصصات أم

CGlossary and referenceالمصطلحات والمرجع