ICS 582Lecture 01المحاضرة 01Part 02الجزء 02
Applications of NLPتطبيقات NLP
Five 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).
- Conceptsالمفاهيم
- 5
- Slidesالشرائح
- 7-13
- Readingمدة القراءة
- 30 min30 دقيقة
Why this part mattersلماذا يهمّ هذا الجزء
Your PhD work will build or evaluate systems like the ones on these seven slides, and a good answer about this lecture names each application together with the NLP task hiding behind it. A screenshot of Google Translate is not an answer. "Fully automatic translation for information access, versus computer-aided translation where a human owns the final text" is.
This part turns seven product screenshots into five reusable ideas: the human-in-the-loop spectrum (machine translation), extraction versus generation (question answering), dictionary versus context (spelling), text to fields (information extraction), and target plus polarity (sentiment). Along the way it plants one more idea that part 03 formalises: most NLP products are chains of components, and every link in the chain can be wrong.
سيبني بحثك في الدكتوراه أنظمة مثل تلك المعروضة في هذه الشرائح السبع أو سيقيّمها، والإجابة الجيدة عن هذه المحاضرة تسمّي كل تطبيق مع مهمة NLP المختبئة خلفه. لقطة شاشة من Google Translateليست إجابة. أما «ترجمة آلية بالكامل للوصول إلى المعلومات، مقابل ترجمة بمساعدة الحاسوب يكون فيها الإنسان هو المسؤول عن النص النهائي» فهي إجابة.
يحوّل هذا الجزء سبع لقطات شاشة لمنتجات إلى خمس أفكار قابلة لإعادة الاستخدام: طيف وجود الإنسان في الحلقة (الترجمة الآلية)، والاستخراج مقابل التوليد (الإجابة عن الأسئلة)، والقاموس مقابل السياق (الإملاء)، ومن النص إلى الحقول (استخراج المعلومات)، والهدف مع القطبية (تحليل المشاعر). وفي الطريق يزرع فكرة أخرى يصوغها الجزء 03 رسميًا: معظم منتجات NLP سلاسل من المكوّنات، وكل حلقة في السلسلة يمكن أن تخطئ.
By the end you canفي نهاية هذا الجزء ستستطيع
- Contrast fully automatic and computer-aided translation, and say when a human must stay in the loop.تقارن بين الترجمة الآلية الكاملة والترجمة بمساعدة الحاسوب، وتحدد متى يجب أن يبقى الإنسان داخل الحلقة.
- Explain the three steps behind a factual answer box, and how retrieval-augmented generation changes both the output and the failure mode.تشرح الخطوات الثلاث وراء صندوق الإجابة الحقائقية، وكيف يغيّر التوليد المعزّز بالاسترجاع (RAG) كلًا من المخرج ونمط الفشل.
- Distinguish non-word from real-word spelling errors, and say why the second needs a language model.تميّز بين أخطاء الإملاء التي تنتج كلمة غير موجودة (non-word) وتلك التي تنتج كلمة حقيقية (real-word)، وتوضح لماذا يحتاج النوع الثاني إلى نموذج لغوي.
- Read an email and fill an event template, including normalising 'tomorrow' against the message date.تقرأ بريدًا إلكترونيًا وتملأ قالب حدث، بما في ذلك تحويل كلمة «tomorrow» إلى تاريخ فعلي بالرجوع إلى تاريخ الرسالة.
- Explain why sentiment must be assigned per aspect, using the word 'light' as the worked case.تشرح لماذا يجب تحديد المشاعر لكل جانب (aspect) على حدة، مستخدمًا كلمة «light» مثالًا محلولًا.
Take the definition of NLP from part 01, paste it into Google Translate, and pick Arabic. In under a second the right pane fills with معالجة اللغة الطبيعية هي فرع من فروع الذكاء الاصطناعي and a Latin transliteration line underneath. Nobody touched that output. The system read 142 characters of English and produced finished Arabic. That is machine translation in its fully automatic mode, and it is the mode most people picture when they hear the words.
خذ تعريف NLP من الجزء 01، والصقه في Google Translate، واختر العربية. في أقل من ثانية تمتلئ الخانة اليمنى بعبارة «معالجة اللغة الطبيعية هي فرع من فروع الذكاء الاصطناعي» ومعها سطر نقحرة (transliteration) بالحروف اللاتينية تحتها. لم يلمس أحد هذا المخرج. قرأ النظام 142 حرفًا من الإنجليزية وأنتج عربية جاهزة. هذه هي الترجمة الآلية (machine translation) في نمطها الآلي بالكامل، وهو النمط الذي يتخيله معظم الناس عندما يسمعون هذه الكلمات.
Now look at the second screenshot on the same slide, which looks nothing like a consumer product. The source box holds an Arabic news sentence about the Lebanese president being subjected to a fierce campaign in parliament. The translator has typed one word into the translation box, lebanese, and the system has answered with a ranked list of what the next word could be: president, suffered, exposed, president emile, before, presented, offer. The human is still writing the sentence. The machine is predicting where the sentence goes next. This is computer-aided translation, and its existence is the most important fact on the slide: the professional tool keeps the human in charge.
انظر الآن إلى لقطة الشاشة الثانية في الشريحة نفسها، وهي لا تشبه منتجًا استهلاكيًا إطلاقًا. يحتوي مربع المصدر على جملة إخبارية عربية عن تعرّض الرئيس اللبناني لحملة عنيفة في البرلمان. كتب المترجم كلمة واحدة في مربع الترجمة، lebanese، فأجاب النظام بقائمة مرتّبة لما يمكن أن تكون عليه الكلمة التالية: president، suffered، exposed، president emile، before، presented، offer. الإنسان ما زال هو من يكتب الجملة، والآلة تتنبأ بالاتجاه الذي ستسير فيه الجملة بعد ذلك. هذه هي الترجمة بمساعدة الحاسوب (computer-aided translation)، ووجودها هو أهم حقيقة في الشريحة: الأداة المهنية تُبقي الإنسان هو صاحب القرار.
Two modes, and who owns the final textنمطان، ومن يملك النص النهائي
Jurafsky and Martin list three uses of MT: information access, aiding human translators, and in-the-moment communication. Fully automatic MT serves information access: you want to read a page written in a language you do not know, and a rough but instant translation is worth more than a perfect one next week. Google Translate alone, they note, translates hundreds of billions of words a day between over 100 languages. The second use is aiding human translators. Here the system is not the author. It drafts a translation that a person then fixes, a workflow called post-editing. Interactive systems (Barrachina et al., 2009) go further: they sit inside the editor and predict as the person types, which is what the slide shows.
يذكر Jurafsky وMartin ثلاثة استخدامات للترجمة الآلية MT: الوصول إلى المعلومات، ومساعدة المترجمين البشريين، والتواصل اللحظي. الترجمة الآلية بالكامل تخدم الوصول إلى المعلومات: تريد قراءة صفحة مكتوبة بلغة لا تعرفها، والترجمة التقريبية الفورية أثمن من ترجمة مثالية تصل الأسبوع القادم. ويذكران أن Google Translate وحده يترجم مئات المليارات من الكلمات يوميًا بين أكثر من 100 لغة. الاستخدام الثاني هو مساعدة المترجمين البشريين. هنا النظام ليس هو المؤلف، بل يكتب مسودة ترجمة يصلحها شخص بعد ذلك، وتسمى طريقة العمل هذه التحرير اللاحق (post-editing). والأنظمة التفاعلية (Barrachina et al., 2009) تذهب أبعد من ذلك: تعمل داخل المحرر وتتنبأ أثناء كتابة الشخص، وهذا ما تعرضه الشريحة.
The interactive kind has a precise description. Barrachina and colleagues put it this way: in each iteration, a prefix of the translation is validated (accepted or amended) by the human and the system computes its best, or n-best, translation suffix to complete that prefix. Read the slide's list with that in mind and it stops being a random menu. The list is an n-best set. "suffered" and "exposed" are two English readings of the same Arabic verb تعرض, and "president" versus "president emile" are two choices about how much of the source to consume in one step. The translator resolves in one click what a fully automatic system would have to gamble on.
للنوع التفاعلي وصف دقيق. يصوغه Barrachina وزملاؤه هكذا: في كل دورة، يعتمد الإنسان بادئة (prefix) من الترجمة (بقبولها أو تعديلها)، ويحسب النظام أفضل لاحقة (suffix) ترجمة، أو أفضل n لواحق (n-best)، لإكمال تلك البادئة. اقرأ قائمة الشريحة بهذا المنظور فتتوقف عن كونها قائمة عشوائية. القائمة مجموعة n-best. الكلمتان «suffered» و«exposed» قراءتان إنجليزيتان للفعل العربي نفسه «تعرّض»، و«president» مقابل «president emile» خياران حول مقدار ما يُستهلك من المصدر في خطوة واحدة. يحسم المترجم بنقرة واحدة ما كان على النظام الآلي بالكامل أن يراهن عليه.
| Modeالنمط | Who produces the final textمن ينتج النص النهائي | Typical useالاستخدام المعتاد | Slide 7 exampleمثال الشريحة 7 |
|---|---|---|---|
| Fully automaticآلي بالكامل | The systemالنظام | Information access, gisting, chatالوصول إلى المعلومات، وفهم الفكرة العامة (gisting)، والدردشة | Google Translate rendering the NLP definition in ArabicGoogle Translate وهو يترجم تعريف NLP إلى العربية |
| Assisted, post-editingبمساعدة الحاسوب، التحرير اللاحق (post-editing) | The human, correcting a machine draftالإنسان، وهو يصحح مسودة آلية | Localisation, documentationالتوطين (localisation)، والوثائق | Not pictured, but the common industrial workflowغير معروض، لكنه سير العمل الصناعي الشائع |
| Assisted, interactive predictionبمساعدة الحاسوب، التنبؤ التفاعلي | The human, accepting or amending predicted suffixesالإنسان، وهو يقبل اللواحق المتنبأ بها أو يعدّلها | Professional translation of news, legal and medical textالترجمة الاحترافية للأخبار والنصوص القانونية والطبية | The ranked list under the typed word lebaneseالقائمة المرتّبة تحت الكلمة المكتوبة lebanese |
Why keep the human at all, when the top screenshot is so good? Because the same paper opens with the plain admission that current MT systems are still not perfect and that in practice their output needs to be edited to correct errors. Which errors matter depends on the text. A gisted news article can survive a wrong verb. A contract, a drug label or a court transcript cannot, and someone must be accountable for the register, the terminology and the liability. The assisted mode is how the field turned an imperfect technology into a productivity tool rather than waiting for a perfect one.
لماذا نُبقي الإنسان أصلًا ما دامت لقطة الشاشة العلوية بهذه الجودة؟ لأن الورقة نفسها تبدأ باعتراف صريح بأن أنظمة الترجمة الآلية الحالية ما زالت غير مثالية، وأن مخرجاتها في الواقع تحتاج إلى تحرير لتصحيح الأخطاء. وأي الأخطاء مهم يعتمد على النص. مقال إخباري يُقرأ لأخذ الفكرة العامة يتحمل فعلًا خاطئًا، أما العقد أو نشرة الدواء أو محضر المحكمة فلا، ويجب أن يكون هناك شخص مسؤول عن مستوى اللغة (register) والمصطلحات والمسؤولية القانونية. النمط المساعد هو الطريقة التي حوّل بها هذا المجال تقنية غير مثالية إلى أداة إنتاجية، بدلًا من انتظار تقنية مثالية.
Recall
Name the two modes of machine translation on slide 7 and say who produces the final text in each.سمِّ نمطي الترجمة الآلية في الشريحة 7، وحدد من ينتج النص النهائي في كل منهما.
Quick checkاختبار سريع
On slide 7, what does the ranked list under the typed word 'lebanese' represent?في الشريحة 7، ماذا تمثّل القائمة المرتّبة تحت الكلمة المكتوبة «lebanese»؟
The product numbers, and why they are pipelinesأرقام المنتجات، ولماذا هي سلاسل معالجة
Slide 8 adds two products with feature lists. The Google Translate app page counts how many languages each mode supports, and the Skype Translator blurb promises voice calls in seven languages and adds a line worth remembering: it uses machine learning, so the more you use it, the better it gets. That sentence is the whole of part 03 in miniature. The system is not a fixed set of rules; it is a model that improves with data.
تضيف الشريحة 8 منتجين مع قوائم ميزاتهما. صفحة تطبيق Google Translate تعدّ اللغات التي يدعمها كل نمط، ووصف Skype Translator يعد بمكالمات صوتية بسبع لغات ويضيف سطرًا يستحق التذكر: إنه يستخدم تعلم الآلة (machine learning)، فكلما استخدمته أكثر تحسّن أكثر. هذه الجملة هي الجزء 03 كله مصغّرًا. النظام ليس مجموعة ثابتة من القواعد، بل نموذج يتحسن بالبيانات.
As printed on slide 8 (historical)كما طُبع في الشريحة 8 (تاريخي)
- Google Translate, typingGoogle Translate، الكتابة
- 103 languages103 لغات
- Google Translate, offlineGoogle Translate، دون اتصال
- 52 languages52 لغة
- Google Translate, instant camera translationGoogle Translate، الترجمة الفورية بالكاميرا
- 30 languages30 لغة
- Google Translate, camera mode (photos)Google Translate، وضع الكاميرا (الصور)
- 37 languages37 لغة
- Google Translate, conversation mode (two-way speech)Google Translate، وضع المحادثة (كلام في الاتجاهين)
- 32 languages32 لغة
- Skype Translator, voice callsSkype Translator، المكالمات الصوتية
- 7 languages7 لغات
- Skype Translator, instant messagingSkype Translator، المراسلة الفورية
- more than 50 languagesأكثر من 50 لغة
The more durable lesson on the slide is structural. Typing 103 languages is one system: text in, text out. Camera mode is not. To translate the Russian street sign in the photo, the phone must first read the pixels as characters (optical character recognition), then translate the characters, then paint the English back onto the image. Conversation mode is longer still: recognise speech, translate, synthesise speech in the other language. Jurafsky and Martin describe exactly this image-centric case, OCR of the text on a phone camera image used as input to an MT system to translate menus or street signs.
الدرس الأبقى في الشريحة درس بنيوي. الكتابة بـ 103 لغات نظام واحد: نص يدخل ونص يخرج. أما نمط الكاميرا فليس كذلك. لترجمة لافتة الشارع الروسية في الصورة، يجب على الهاتف أولًا أن يقرأ البكسلات كحروف (التعرف الضوئي على الحروف OCR)، ثم يترجم الحروف، ثم يرسم الإنجليزية فوق الصورة. ونمط المحادثة أطول: التعرف على الكلام، ثم الترجمة، ثم توليد الكلام باللغة الأخرى. ويصف JurafskyوMartin هذه الحالة المعتمدة على الصورة تحديدًا: OCR للنص في صورة كاميرا الهاتف يُستخدم مدخلًا لنظام MT لترجمة قوائم الطعام أو لافتات الشوارع.
A photo of a sign or a menu.
صورة للافتة أو لقائمة طعام.
Wrong letter here, wrong word later.
حرف خاطئ هنا يعني كلمة خاطئة لاحقًا.
The only NLP step the slide names.
خطوة NLP الوحيدة التي تسمّيها الشريحة.
Painted back over the sign.
تُرسم من جديد فوق اللافتة.
One speaker talks.
يتكلم أحد المتحدثَين.
Speech recognition guesses the words.
يخمّن التعرف على الكلام الكلماتِ المنطوقة.
Same MT engine as above.
محرك MT نفسه المذكور أعلاه.
The other speaker hears it.
يسمعه المتحدث الآخر.
Keep this picture. When part 03 introduces the linguistic pipeline from paragraphs down to morphemes, and when part 04 lists the ways language defeats a system, both are describing links in chains like these. A product that looks like one feature is usually three or four NLP tasks in a row, and the quality the user sees is the product of all of them.
احتفظ بهذه الصورة في ذهنك. عندما يقدّم الجزء 03 سلسلة المعالجة اللغوية من الفقرات نزولًا إلى الوحدات الصرفية (morphemes)، وعندما يسرد الجزء 04 الطرق التي تهزم بها اللغةُ الأنظمة، فكلاهما يصف حلقات في سلاسل كهذه. المنتج الذي يبدو ميزة واحدة هو عادةً ثلاث أو أربع مهام NLP متتالية، والجودة التي يراها المستخدم هي حاصل ضرب جودتها جميعًا.
Type how heavy is our planet into a search engine and two very different things can come back. On slide 9 the engine answers with a card: Earth, Mass, 5.972 × 1024 kg, a photograph, and a row of related planets. On slide 10 the same query produces an AI Overview: a paragraph explaining that Earth has a mass of approximately 5.972 × 1024 kilograms, about 13.1 septillion pounds, measured using gravity rather than scales, with a heading on how scientists measure it and two cited sources in a side rail. Both are question answering. They are built on opposite principles.
اكتب how heavy is our planet في محرك بحث، وقد يعود إليك شيئان مختلفان تمامًا. في الشريحة 9 يجيب المحرك ببطاقة: Earth، Mass، 5.972 × 1024 kg، وصورة، وصف من الكواكب ذات الصلة. وفي الشريحة 10 ينتج الاستعلام نفسه AI Overview: فقرة تشرح أن كتلة الأرض تقارب 5.972 × 1024 kilograms، أي نحو 13.1 septillion pounds، وأنها تُقاس باستخدام الجاذبية لا الموازين، مع عنوان فرعي عن كيفية قياس العلماء لها ومصدرين مستشهد بهما في شريط جانبي. كلاهما إجابة عن الأسئلة (question answering)، لكنهما مبنيان على مبدأين متعاكسين.
What the answer box has to get rightما الذي يجب أن يصيب فيه صندوق الإجابة
The card looks trivial and hides three separate decisions. The slide's own label names two of them: information extraction and word sense disambiguation. Start with the word "heavy". It has several senses: heavy rain, heavy traffic, a heavy heart, a heavy object. Only one of them is a physical quantity a database could store, so the system must choose the sense "has a large mass" before it can look anything up. That choice is word sense disambiguation, and the answer card's label "Mass" is the visible trace of it.
تبدو البطاقة بسيطة لكنها تخفي ثلاثة قرارات منفصلة. عنوان الشريحة نفسه يسمّي اثنين منها: استخراج المعلومات وإزالة غموض معنى الكلمة. ابدأ بكلمة «heavy». لها عدة معانٍ: heavy rain (مطر غزير)، وheavy traffic (ازدحام شديد)، وa heavy heart (قلب مثقل)، وa heavy object (جسم ثقيل). واحد منها فقط كمية فيزيائية يمكن لقاعدة بيانات أن تخزنها، لذلك يجب على النظام أن يختار معنى «له كتلة كبيرة» قبل أن يبحث عن أي شيء. هذا الاختيار هو إزالة غموض معنى الكلمة (word sense disambiguation)، وعنوان البطاقة «Mass» هو الأثر المرئي له.
The second decision is about "our planet". No table anywhere has a row called "our planet". The phrase is a string; the answer requires a thing. Google's Knowledge Graph was announced in 2012 under exactly that slogan, things not strings: a model that understands real-world entities and their relationships to one another, so that "Taj Mahal" can mean the monument or the musician. Mapping the mention "our planet" to the entity Earth is entity linking. (The literature calls this entity linking; entity resolution more often means merging duplicate records.) Only once both decisions are made does the third step become a lookup: fetch the mass attribute of the Earth node.
القرار الثاني يتعلق بعبارة «our planet». لا يوجد جدول في أي مكان فيه صف اسمه «our planet». العبارة سلسلة نصية (string)، والإجابة تتطلب شيئًا (thing). أُعلن عن Knowledge Graph من Google في 2012 تحت هذا الشعار بالضبط، «things not strings»: نموذج يفهم الكيانات الحقيقية وعلاقاتها ببعضها، بحيث يمكن أن تعني «Taj Mahal» المعلم الأثري أو الموسيقي. ربط الذكر «our planet» بالكيان Earth هو ربط الكيانات (entity linking). (تسميه الأدبيات entity linking، أما entity resolution فتعني في الغالب دمج السجلات المكررة.) وفقط بعد اتخاذ القرارين تصبح الخطوة الثالثة مجرد بحث: اجلب خاصية الكتلة من عقدة Earth.
Where did the graph get that number? From text, by information extraction: Jurafsky and Martin define IE as turning the unstructured information embedded in texts into structured data, for example for populating a relational database, and note that knowledge graphs of structured relational knowledge are a useful way for search engines to present information to users. The answer box is therefore the last inch of a long chain: extractors read encyclopedias and fact sheets once, store facts as graph edges, and the search engine reads the edge at query time. The same machinery returns in the email example two concepts from now.
من أين حصل الرسم على هذا الرقم؟ من النصوص، عن طريق استخراج المعلومات (information extraction): يعرّف Jurafsky وMartin الـ IE بأنه تحويل المعلومات غير المنظمة المضمّنة في النصوص إلى بيانات منظمة، مثلًا لملء قاعدة بيانات علائقية، ويذكران أن رسوم المعرفة التي تحمل معرفة علائقية منظمة طريقة مفيدة لمحركات البحث لعرض المعلومات على المستخدمين. لذا فصندوق الإجابة هو آخر بوصة في سلسلة طويلة: تقرأ برامج الاستخراج الموسوعات وصحائف الحقائق مرة واحدة، وتخزن الحقائق كحواف في الرسم، ثم يقرأ محرك البحث الحافة وقت الاستعلام. وتعود الآلية نفسها في مثال البريد الإلكتروني بعد مفهومين من الآن.
Worked exampleمثال محلول
How the answer box answers 'how heavy is our planet'كيف يجيب صندوق الإجابة عن «how heavy is our planet»
Disambiguate the senseأزل غموض المعنى
"heavy" is read as mass, not as the sense in heavy rain or heavy traffic. This selects the attribute to look up.تُقرأ «heavy» بمعنى الكتلة، لا بالمعنى الذي في heavy rain أو heavy traffic. وهذا يحدد الخاصية التي سيُبحث عنها.Resolve the entityحدد الكيان
"our planet" is mapped to the knowledge graph node Earth. This selects the row.تُربط «our planet» بعقدة Earth في رسم المعرفة. وهذا يحدد الصف.Retrieve the factاسترجع الحقيقة
The pair (Earth, mass) returns 5.972 × 1024 kg, a value that an information extraction system once pulled from a source document into the graph.الزوج (Earth, mass) يعيد 5.972 × 1024 kg، وهي قيمة سحبها نظام استخراج معلومات ذات مرة من وثيقة مصدر إلى الرسم.One field, renderedحقل واحد، معروض
Earth / Mass / 5.972 × 1024 kg, plus neighbouring nodes (Mars, Venus, Jupiter) as "People also search for".Earth / Mass / 5.972 × 1024 kg، إضافة إلى العقد المجاورة (Mars وVenus وJupiter) تحت عنوان «People also search for».
| Planetالكوكب | Slide 9 valueقيمة الشريحة 9 | Earth masses on slideبكتل الأرض كما في الشريحة | NASA valueقيمة NASA | NASA ratio to Earthنسبة NASA إلى الأرض |
|---|---|---|---|---|
| Earthالأرض | 5.972 × 1024 kg5.972 × 1024 kg | 11 | 5.9722 × 1024 kg5.9722 × 1024 kg | 11 |
| Marsالمريخ | 6.39 × 1023 kg6.39 × 1023 kg | 0.1070.107 | 6.4169 × 1023 kg6.4169 × 1023 kg | 0.1070.107 |
| Venusالزهرة | 4.867 × 1024 kg4.867 × 1024 kg | 0.8150.815 | 4.8673 × 1024 kg4.8673 × 1024 kg | 0.8150.815 |
| Jupiterالمشتري | 1.898 × 1027 kg1.898 × 1027 kg | 317.8317.8 | 1.89813 × 1027 kg1.89813 × 1027 kg | 317.8317.8 |
The ratios check out from the slide's own numbers: 6.39 / 59.72 = 0.107, 4.867 / 5.972 = 0.815 and 1898 / 5.972 = 317.8. The Mars row also carries a quiet lesson: the card shows 6.39 × 1023 kg while NASA's current fact sheet lists 6.4169 × 1023 kg, about 0.4 percent higher. Nothing in the card is broken. An extracted fact is only as accurate as the source it was extracted from, and that is the answer box's characteristic failure: it can only be as wrong as its stored fact, and it has no way to be more right.
النسب صحيحة عند حسابها من أرقام الشريحة نفسها: 6.39 / 59.72 = 0.107، 4.867 / 5.972 = 0.815، و1898 / 5.972 = 317.8. ويحمل صف Mars درسًا هادئًا أيضًا: البطاقة تعرض 6.39 × 1023 kg بينما تذكر صحيفة الحقائق الحالية لدى NASA 6.4169 × 1023 kg، أي أعلى بنحو 0.4 بالمئة. لا شيء في البطاقة معطّل. الحقيقة المستخرجة دقيقة بقدر دقة المصدر الذي استُخرجت منه فقط، وهذا هو الفشل المميز لصندوق الإجابة: لا يمكن أن يكون خاطئًا بأكثر من خطأ الحقيقة المخزنة، ولا سبيل له لأن يكون أصح منها.
What changes when a language model writes the answerما الذي يتغير عندما يكتب نموذج لغوي الإجابة
Slide 10 is the same query on a search page with an AI Mode tab and an AI Overview. Nothing was looked up in a graph and rendered as a card. Instead the engine retrieved documents, handed them to a large language model, and let the model write. Jurafsky and Martin call this retrieval-augmented generation: use information retrieval techniques to retrieve documents, then use a large language model to generate an answer conditioned on those documents. The recipe is three lines. Retrieve the top passages for the query, build a prompt that contains the query and those passages, and call the model.
الشريحة 10 هي الاستعلام نفسه في صفحة بحث فيها تبويب AI Mode وAI Overview. لم يُبحث عن شيء في رسم ولم يُعرض في بطاقة. بدلًا من ذلك استرجع المحرك وثائق، وسلّمها إلى نموذج لغوي كبير (large language model)، وترك النموذج يكتب. يسمي Jurafsky وMartin هذا التوليد المعزّز بالاسترجاع (retrieval-augmented generation): استخدم تقنيات استرجاع المعلومات لاسترجاع الوثائق، ثم استخدم نموذجًا لغويًا كبيرًا لتوليد إجابة مشروطة بتلك الوثائق. الوصفة ثلاثة أسطر: استرجع أفضل المقاطع للاستعلام، وابنِ prompt يحتوي الاستعلام وتلك المقاطع، ثم استدعِ النموذج.
The screenshot shows every ingredient. The retrieved passages are the two cards in the side rail, an AIP Inside Science article titled "How Much Does Earth Weigh?" and the Wikipedia article on Earth. The generation is the paragraph, which is not a quotation from either page but a new text stitched from both, complete with a unit conversion: 5.972 × 1024 kg times 2.20462 lb/kg is 1.317 × 1025 lb, which is the "13,170,000,000,000,000,000,000,000 lbs" in the overview and the "13 thousand, 170 billion trillion pounds" in the AIP article. The citation chips are the last ingredient, what the textbook calls a knowledge citation that helps the user decide whether to trust the generation.
تُظهر لقطة الشاشة كل المكوّنات. المقاطع المسترجعة هي البطاقتان في الشريط الجانبي: مقال من AIP Inside Science بعنوان «How Much Does Earth Weigh?»، ومقال ويكيبيديا عن Earth. والتوليد هو الفقرة، وهي ليست اقتباسًا من أي من الصفحتين بل نص جديد مخيط من كلتيهما، ومعه تحويل للوحدات: 5.972 × 1024 kg مضروبة في 2.20462 lb/kg تساوي 1.317 × 1025 lb، وهي «13,170,000,000,000,000,000,000,000 lbs» في الـ overview و«13 thousand, 170 billion trillion pounds» في مقال AIP. ورقاقات الاستشهاد (citation chips) هي المكوّن الأخير، وهي ما يسميه الكتاب استشهادًا معرفيًا (knowledge citation) يساعد المستخدم على تقرير ما إذا كان يثق بالنص المولَّد.
Look closely at the second chip and you can see the seams. Its snippet reads "Table_title: Earth Table_content: header: | Designations | row: ...", which is not prose at all; the retriever pulled a Wikipedia infobox as a flattened table and the model wrote around it. That is the point of the shift: the classic box extracts one structured fact and shows it, the overview retrieves raw text and composes. The output is more helpful, more explanatory and more flexible, and it introduces a failure that the card never had.
انظر عن قرب إلى الرقاقة الثانية وسترى مواضع الخياطة. مقتطفها يقول «Table_title: Earth Table_content: header: | Designations | row: ...»، وهذا ليس نثرًا على الإطلاق: سحب المسترجِع صندوق معلومات (infobox) من ويكيبيديا على شكل جدول مسطّح، وكتب النموذج حوله. وهذا هو جوهر التحول: الصندوق التقليدي يستخرج حقيقة منظمة واحدة ويعرضها، والـ overview يسترجع نصًا خامًا ويؤلّف منه. المخرج أكثر فائدة وأكثر شرحًا وأكثر مرونة، لكنه يُدخل نوعًا من الفشل لم يكن موجودًا في البطاقة قط.
| Propertyالخاصية | Answer box (slide 9)صندوق الإجابة (الشريحة 9) | AI Overview (slide 10)AI Overview (الشريحة 10) |
|---|---|---|
| What is producedما الذي يُنتَج | One field, rendered as a cardحقل واحد يُعرض على شكل بطاقة | A paragraph, with headings and a Show more buttonفقرة، مع عناوين وزر «Show more» |
| Where the answer comes fromمصدر الإجابة | A knowledge graph entryمُدخل في رسم المعرفة (knowledge graph) | Retrieved pages fed to a large language modelصفحات مسترجعة تُمرَّر إلى نموذج لغوي كبير (LLM) |
| Core NLP stepsخطوات NLP الأساسية | Sense disambiguation, entity linking, lookupإزالة غموض المعنى، وربط الكيان، والبحث | Retrieval, prompt construction, generationالاسترجاع، وبناء الـ prompt، والتوليد |
| Provenanceمصدر المعلومة (provenance) | Implicit: the graph itselfضمني: رسم المعرفة نفسه | Explicit: citation chips next to claimsصريح: شارات استشهاد بجانب الادعاءات |
| Main failureالفشل الرئيسي | A stale, imprecise, or missing factحقيقة قديمة أو غير دقيقة أو مفقودة | Fluent text that is not faithful to the facts or its cited sourcesنص سلس لكنه غير أمين للحقائق أو للمصادر التي يستشهد بها |
| Cost per queryالتكلفة لكل استعلام | A lookupعملية بحث واحدة | A large model inferenceاستدلال (inference) بنموذج كبير |
That new failure has a name. Large language models hallucinate, and a hallucination, in Jurafsky and Martin's words, is a response that is not faithful to the facts of the world. They report a study in which, asked questions about the legal domain, large language models hallucinated from 69 to 88 percent of the time, and add the more troubling half: it is not always possible to tell when a model is hallucinating, partly because LLMs are not well calibrated, so they can give a very wrong answer with complete certainty. The card can be stale. The paragraph can be wrong while sounding exactly like the truth, and the citations can point to a page that does not say what the paragraph claims.
لهذا الفشل الجديد اسم. النماذج اللغوية الكبيرة تهلوس، والهلوسة (hallucination) بتعبير Jurafsky وMartin استجابة غير أمينة لحقائق العالم. ويذكران دراسة وجدت أن النماذج اللغوية الكبيرة، عند سؤالها أسئلة في المجال القانوني، هلوست بنسبة تتراوح من 69 إلى 88 بالمئة من الوقت، ويضيفان النصف الأكثر إقلاقًا: ليس من الممكن دائمًا معرفة متى يهلوس النموذج، ويعود ذلك جزئيًا إلى أن الـ LLMs ليست معايرة جيدًا (not well calibrated)، فقد تعطي إجابة خاطئة تمامًا بيقين كامل. البطاقة قد تكون قديمة. أما الفقرة فقد تكون خاطئة وهي تبدو تمامًا كالحقيقة، وقد تشير الاستشهادات إلى صفحة لا تقول ما تدّعيه الفقرة.
Recall
What are the three things a classic answer box must do to answer 'how heavy is our planet'?ما الأمور الثلاثة التي يجب أن يفعلها صندوق الإجابة التقليدي ليجيب عن «how heavy is our planet»؟
Quick checkاختبار سريع
Compared with the classic answer box, what new failure mode does the AI Overview introduce?مقارنةً بصندوق الإجابة التقليدي، ما نمط الفشل الجديد الذي يُدخله AI Overview؟
Slide 11 shows spelling and grammar correction at work: a Word window with one sentence in it, This is bigger then that ofcourse. Two words are underlined, and the colours are not decoration. ofcourse carries a red squiggle. then carries a blue one, and the context menu under it offers a single replacement, than. Microsoft's documentation spells out the convention: potential spelling errors get a red squiggly line, potential grammatical errors get a blue one. The two colours mark two different problems, and the second is much harder than the first.
تعرض الشريحة 11 تصحيح الإملاء والقواعد (spelling and grammar correction) أثناء العمل: نافذة Word فيها جملة واحدة، This is bigger then that ofcourse. تحت كلمتين خط، والألوان ليست للزينة. تحت ofcourse خط متموج أحمر، وتحت then خط متموج أزرق، والقائمة المنبثقة تحتها تقترح بديلًا واحدًا، than. توثيق Microsoft يوضح القاعدة: أخطاء الإملاء المحتملة تحصل على خط متموج أحمر، والأخطاء النحوية المحتملة على خط أزرق. اللونان يشيران إلى مشكلتين مختلفتين، والثانية أصعب بكثير من الأولى.
Jurafsky and Martin draw the line precisely. Non-word spelling correction is the detection and correction of spelling errors that result in non-words, like graffe for giraffe. Real-word spelling correction is the task of detecting and correcting spelling errors even if they accidentally result in an actual word of English. ofcourse is the first kind: it is not in any dictionary, so the check is a lookup that needs no context whatsoever. then is the second kind. It is a perfectly good English word, in the dictionary, spelled correctly. Nothing about the word itself is wrong. What is wrong is the word in this position, between "bigger" and "that", where English demands the comparative partner "than".
يرسم Jurafsky وMartin الحد بدقة. تصحيح أخطاء الكلمات غير الموجودة (non-word spelling correction) هو اكتشاف وتصحيح أخطاء الإملاء التي تنتج كلمات غير موجودة، مثل graffe بدل giraffe. أما تصحيح أخطاء الكلمات الحقيقية (real-word spelling correction) فهو مهمة اكتشاف وتصحيح أخطاء الإملاء حتى لو نتجت عنها مصادفةً كلمة إنجليزية حقيقية. ofcourse من النوع الأول: ليست في أي قاموس، فالفحص مجرد بحث لا يحتاج إلى أي سياق على الإطلاق. وthen من النوع الثاني. إنها كلمة إنجليزية سليمة تمامًا، موجودة في القاموس ومكتوبة بشكل صحيح. لا شيء في الكلمة نفسها خاطئ. الخطأ هو الكلمة في هذا الموضع، بين «bigger» و«that»، حيث تتطلب الإنجليزية الكلمة المرافقة للمقارنة «than».
That difference is why the second problem is hard. The textbook says it directly: real-word spelling error detection is a much more difficult task, since any word in the input text could be an error. And it is not a rare case. Studies suggest that between 25 and 40 percent of spelling errors are valid English words. A checker that only consults a dictionary silently passes a quarter to nearly half of all mistakes. To catch them, the system must know what English sentences look like, which is to say it needs alanguage model, a model that assigns higher probability to "bigger than that" than to "bigger then that", or a grammar rule that encodes the same preference by hand.
هذا الفرق هو سبب صعوبة المشكلة الثانية. يقولها الكتاب صراحة: اكتشاف أخطاء الكلمات الحقيقية مهمة أصعب بكثير، لأن أي كلمة في النص المُدخل قد تكون خطأ. وهي ليست حالة نادرة. تشير الدراسات إلى أن ما بين 25 و40 بالمئة من أخطاء الإملاء كلمات إنجليزية صحيحة. المدقق الذي يرجع إلى القاموس فقط يمرّر بصمت من ربع إلى ما يقارب نصف كل الأخطاء. ولاكتشافها يجب أن يعرف النظام كيف تبدو الجمل الإنجليزية، أي أنه يحتاج إلى نموذج لغوي (language model)، وهو نموذج يعطي احتمالًا أعلى لـ «bigger than that» منه لـ «bigger then that»، أو إلى قاعدة نحوية تشفّر التفضيل نفسه يدويًا.
The noisy channel, in one lineالقناة المشوّشة، في سطر واحد
The classical machinery for both kinds is the noisy channel model. Imagine the writer meant some word w and a noisy channel, their fingers, produced x. The corrector wants the intended word that best explains what it sees.
الآلية الكلاسيكية للنوعين هي نموذج القناة المشوّشة (noisy channel model). تخيّل أن الكاتب قصد كلمة ما w، وأن قناة مشوّشة، وهي أصابعه، أنتجت x. يريد المصحّح الكلمة المقصودة التي تفسّر ما يراه على أفضل وجه.
The candidate set V is kept small because the majority of spelling errors consist of a single-letter change, so candidates within one insertion, deletion, substitution or transposition of the typed string (Damerau-Levenshtein distance 1) cover most cases. For a non-word, the language model term just prefers common words. For a real-word error, the channel model works against the correction: in the Mays et al. model the textbook uses, P(x | w) is alpha (about 0.95) when the typed word is the intended one, and only the small remainder 1 - alpha is spread over candidates such as than. The language model term P(w) must therefore outweigh that bias, and it can only do so from context.
تبقى مجموعة المرشحين V صغيرة لأن غالبية أخطاء الإملاء تتكون من تغيير حرف واحد، فالمرشحون الذين يبعدون إدراجًا واحدًا أو حذفًا أو استبدالًا أو تبديل موضع حرفين متجاورين عن السلسلة المكتوبة (مسافة Damerau-Levenshtein تساوي 1) يغطون معظم الحالات. في حالة الكلمة غير الموجودة، يفضّل حد النموذج اللغوي الكلمات الشائعة فقط. أما في خطأ الكلمة الحقيقية فنموذج القناة يعمل ضد التصحيح: في نموذج Mays et al. الذي يستخدمه الكتاب، تساوي P(x | w) القيمة alpha (نحو 0.95) عندما تكون الكلمة المكتوبة هي المقصودة، ولا يتوزع على المرشحين مثل than إلا الباقي الصغير 1 - alpha. لذلك يجب أن يتغلب حد النموذج اللغوي P(w) على هذا الانحياز، ولا يستطيع ذلك إلا من خلال السياق.
Worked exampleمثال محلول
Why 'then' needs contextلماذا تحتاج «then» إلى السياق
Dictionary lookupالبحث في القاموس
ofcourse is not in the vocabulary. Flag it, generate neighbours within one edit (insert a space, giving "of course"), pick the most probable. No context needed. Red underline.ofcourse ليست في المفردات. ضع عليها علامة، وولّد الجيران على بُعد تعديل واحد (أدخل مسافة لتحصل على «of course»)، واختر الأكثر احتمالًا. لا حاجة إلى سياق. خط أحمر.Dictionary lookup againالبحث في القاموس مرة أخرى
then is in the vocabulary. Lookup passes it. If the checker stopped here, the error would survive.then موجودة في المفردات، فيمرّرها البحث. لو توقف المدقق هنا لنجا الخطأ.Generate real-word candidatesولّد مرشحين من الكلمات الحقيقية
Words within one edit of "then" include than, the, them, ten, hen. Each is a plausible intended word under the channel model.الكلمات التي تبعد تعديلًا واحدًا عن «then» تشمل than وthe وthem وten وhen. كل منها كلمة مقصودة محتملة وفق نموذج القناة.Score the sentence with a language modelقيّم الجملة بنموذج لغوي
Under any model of English, "bigger than that" is far more probable than "bigger then that", "bigger the that" or "bigger them that". The product of channel and language model peaks at "than".وفق أي نموذج للإنجليزية، «bigger than that» أكثر احتمالًا بكثير من «bigger then that» أو «bigger the that» أو «bigger them that». وحاصل ضرب نموذج القناة في النموذج اللغوي يبلغ ذروته عند «than».Blue underline, one suggestionخط أزرق، واقتراح واحد
The checker offers than, exactly the menu on the slide. The exact probabilities depend on the model; the ordering does not.يقترح المدقق than، وهي بالضبط القائمة في الشريحة. الاحتمالات الدقيقة تعتمد على النموذج، أما الترتيب فلا.
This is also the oldest NLP application most people use every day. Jurafsky and Martin note that spelling correctors are ubiquitous in pretty much any software that relies on keyboard input, from word processors to search boxes to phone keyboards, and the same noisy channel idea reappears in speech recognition and machine translation. Real-word correction was also an early case of a language model doing linguistic work that no dictionary could, which is the pattern the whole modern field follows.
وهذا أيضًا أقدم تطبيق NLP يستخدمه معظم الناس كل يوم. يذكر Jurafsky وMartin أن مصححات الإملاء منتشرة في كل برنامج تقريبًا يعتمد على الإدخال بلوحة المفاتيح، من معالجات النصوص إلى مربعات البحث إلى لوحات مفاتيح الهواتف، وأن فكرة القناة المشوّشة نفسها تظهر مجددًا في التعرف على الكلام وفي الترجمة الآلية. وكان تصحيح الكلمات الحقيقية أيضًا حالة مبكرة لنموذج لغوي يؤدي عملًا لغويًا لا يستطيعه أي قاموس، وهذا هو النمط الذي يتبعه المجال الحديث كله.
Recall
Which of 'then' and 'ofcourse' is a non-word error, and why is the other one harder to catch?أيٌّ من «then» و«ofcourse» خطأ كلمة غير موجودة، ولماذا يصعب اكتشاف الآخر أكثر؟
Quick checkاختبار سريع
Why does Word need context to flag 'then' but not 'ofcourse'?لماذا يحتاج Word إلى السياق ليُعلِّم «then» ولا يحتاجه مع «ofcourse»؟
An email arrives for Dan Jurafsky, dated January 15, 2012, subject "curriculum meeting". The body is two lines: "Hi Dan, we've now scheduled the curriculum meeting. It will be in Gates 159 tomorrow from 10:00-11:30. -Chris". Beside it sits a grey card that the mail client has filled in by itself: Event, Date, Start, End, Where, and a blue button, Create new Calendar entry. The email is prose. The card is a record. Getting from one to the other is information extraction, and the card is the clearest picture of it in the whole lecture.
يصل بريد إلكتروني إلى Dan Jurafsky بتاريخ January 15, 2012، وموضوعه «curriculum meeting». نص الرسالة سطران: «Hi Dan, we've now scheduled the curriculum meeting. It will be in Gates 159 tomorrow from 10:00-11:30. -Chris». وبجانبه بطاقة رمادية ملأها برنامج البريد بنفسه: Event وDate وStart وEnd وWhere، وزر أزرق: Create new Calendar entry. البريد نثر، والبطاقة سجل. والانتقال من الأول إلى الثاني هو استخراج المعلومات (information extraction)، والبطاقة أوضح صورة له في المحاضرة كلها.
Hover or tap a span in the email, or a field in the record, to see what filled it.مرّر المؤشر أو انقر على مقطع في البريد، أو على حقل في السجل، لترى ما الذي ملأه.
- Subject:
- Date:
- To:
- Dan Jurafsky
Hi Dan, we've now scheduled the .
It will be in from -.
-Chris
Two fields are copied straight from the text (the room and the event name). Three are inferred: the date is the header date plus one day, and the time range is split in two with morning assumed. Inferred slots are where an extractor can be wrong.حقلان يُنسخان مباشرة من النص (القاعة واسم الحدث). وثلاثة تُستنتج: التاريخ هو تاريخ الترويسة مضافًا إليه يوم واحد، ومدى الوقت يُقسم إلى قسمين مع افتراض أنه صباحًا. والخانات المستنتجة هي المواضع التي قد يخطئ فيها المستخرِج.
The extracted record on slide 12السجل المستخرج في الشريحة 12
- Eventالحدث (Event)
- Curriculum mtgاجتماع المنهج (Curriculum mtg)
- Dateالتاريخ (Date)
- Jan-16-2012Jan-16-2012
- Startالبداية (Start)
- 10:00am10:00am
- Endالنهاية (End)
- 11:30am11:30am
- Whereالمكان (Where)
- Gates 159Gates 159
- Actionالإجراء (Action)
- Create new Calendar entryإنشاء موعد جديد في التقويم (Create new Calendar entry)
The card is an instance of what Jurafsky and Martin call template filling: find documents that invoke a particular script, then fill the slots of the associated template with fillers extracted from the text. The script here is "a meeting is being scheduled", the template has five slots, and the textbook adds the distinction that makes the slide interesting. Slot fillers may consist of text segments extracted directly from the text, or they may consist of concepts that have been inferred from text elements through some additional processing. Sort the five fields by that rule and they split cleanly in two.
البطاقة مثال على ما يسميه Jurafsky وMartin ملء القوالب (template filling): اعثر على الوثائق التي تستدعي سيناريو (script) معينًا، ثم املأ خانات القالب المرتبط به بقيم مستخرجة من النص. السيناريو هنا «اجتماع يجري تحديد موعده»، والقالب له خمس خانات، ويضيف الكتاب التمييز الذي يجعل الشريحة مثيرة للاهتمام: قيم الخانات قد تكون مقاطع نصية مستخرجة مباشرة من النص، أو مفاهيم استُنتجت من عناصر النص عبر معالجة إضافية. رتّب الحقول الخمسة وفق هذه القاعدة فتنقسم بوضوح إلى مجموعتين.
| Fieldالحقل | Text it came fromالنص الذي جاءت منه | Copied or inferredمنسوخة أم مستنتَجة | What had to happenما الذي كان يجب أن يحدث |
|---|---|---|---|
| Whereالمكان (Where) | Gates 159Gates 159 | Copiedمنسوخة | Recognise a building-plus-room string as a locationالتعرّف على سلسلة نصية من مبنى ورقم غرفة بوصفها موقعًا |
| Eventالحدث (Event) | curriculum meetingcurriculum meeting | Copied, then abbreviatedمنسوخة، ثم مختصَرة | Take the subject line as the event nameأخذ سطر الموضوع اسمًا للحدث |
| Dateالتاريخ (Date) | tomorrow, with the header date January 15, 2012tomorrow، مع تاريخ الترويسة January 15, 2012 | Inferredمستنتَجة | Resolve a relative expression against the document dateتحويل تعبير نسبي بالرجوع إلى تاريخ الوثيقة |
| Startالبداية (Start) | 10:0010:00 | Inferredمستنتَجة | Split the range, assume morningتقسيم النطاق، وافتراض أنه صباحًا |
| Endالنهاية (End) | 11:3011:30 | Inferredمستنتَجة | Split the range, assume morningتقسيم النطاق، وافتراض أنه صباحًا |
Resolving "tomorrow"تحويل «tomorrow» إلى تاريخ
The Date field is the one worth slowing down on, because the word "tomorrow" contains no date at all. Jurafsky and Martin call this temporal normalization, the task of mapping a temporal expression to a point in time or to a duration, and they explain why it is possible: most temporal expressions are incomplete and only implicitly anchored, often with respect to the dateline of the article, which they call the document's temporal anchor. The values of expressions such as today, yesterday or tomorrow can all be computed relative to that anchor, and the rule for these two is the simplest one there is. Tomorrow adds a day to the anchor, yesterday subtracts one.
حقل Date هو الذي يستحق التمهل عنده، لأن كلمة «tomorrow» لا تحتوي أي تاريخ على الإطلاق. يسمي Jurafsky وMartin هذا التطبيع الزمني (temporal normalization)، وهو مهمة ربط التعبير الزمني بنقطة في الزمن أو بمدة، ويشرحان لماذا هو ممكن: معظم التعابير الزمنية ناقصة ومرتبطة ضمنيًا فقط، وغالبًا ما يكون ذلك بالنسبة إلى تاريخ نشر المقال، الذي يسميانه المرساة الزمنية للوثيقة (temporal anchor). ويمكن حساب قيم تعابير مثل today وyesterday وtomorrow كلها بالنسبة إلى تلك المرساة، والقاعدة لهذين الاثنين أبسط قاعدة ممكنة: tomorrow تضيف يومًا إلى المرساة، وyesterday تطرح يومًا.
Worked exampleمثال محلول
From 'tomorrow' to Jan-16-2012من «tomorrow» إلى Jan-16-2012
Find the anchorاعثر على المرساة
The email header gives the document date: January 15, 2012. This is the temporal anchor.ترويسة البريد تعطي تاريخ الوثيقة: January 15, 2012. هذه هي المرساة الزمنية.Classify the expressionصنّف التعبير
"tomorrow" is a relative expression, not an absolute date like "January 16" and not a duration like "two hours".«tomorrow» تعبير نسبي، وليس تاريخًا مطلقًا مثل «January 16»، وليس مدة مثل «ساعتين» (two hours).Apply the ruleطبّق القاعدة
Anchor plus one day: 2012-01-15 becomes 2012-01-16, the ISO 8601 value that the card displays as Jan-16-2012.المرساة زائد يوم واحد: 2012-01-15 تصبح 2012-01-16، وهي قيمة ISO 8601 التي تعرضها البطاقة على شكل Jan-16-2012.Split the time rangeقسّم النطاق الزمني
"10:00-11:30" is one string holding two times. Start takes 10:00, End takes 11:30. The text never says am or pm; the extractor assumes a meeting at ten is in the morning, which is a world knowledge inference and a possible error.«10:00-11:30» سلسلة واحدة تحمل وقتين. يأخذ Start القيمة 10:00، ويأخذ End القيمة 11:30. النص لا يذكر am أو pm أبدًا، ويفترض المستخرِج أن اجتماعًا في العاشرة يكون صباحًا، وهذا استنتاج من المعرفة بالعالم (world knowledge) وخطأ محتمل.Fill the locationاملأ المكان
Gates 159 is recognised as a named entity of type location, a building name followed by a room number, and copied into Where.يُتعرَّف على Gates 159 بوصفه كيانًا مسمّى (named entity) من نوع موقع، أي اسم مبنى يليه رقم غرفة، ويُنسخ إلى Where.Five slots, one actionخمس خانات، وإجراء واحد
Every slot is filled, so the client can enable Create new Calendar entry. The two copied fields are safe. The three inferred ones are where a bug would live.كل الخانات ممتلئة، فيستطيع البرنامج تفعيل Create new Calendar entry. الحقلان المنسوخان آمنان، والحقول الثلاثة المستنتجة هي حيث يمكن أن يختبئ الخطأ.
Two threads tie this concept to its neighbours. First, the textbook's own exercise on this chapter asks for exactly the application on the slide: associating temporal expressions connected with events in email with specific calendar entries, which is a sign of how central the example is. Second, the graph that the answer box read from in the previous concept was populated by the same kind of extractor working over encyclopedias instead of inboxes. Search returns documents. Extraction returns fields with normalised values that a program can act on, and the blue button is the program acting.
خيطان يربطان هذا المفهوم بجيرانه. أولًا، تمرين الكتاب نفسه في هذا الفصل يطلب التطبيق الموجود في الشريحة بالضبط: ربط التعابير الزمنية المتصلة بالأحداث في البريد الإلكتروني بمدخلات تقويم محددة، وهذا دليل على مدى مركزية المثال. ثانيًا، الرسم الذي قرأ منه صندوق الإجابة في المفهوم السابق مُلئ بالنوع نفسه من المستخرِجات وهي تعمل على الموسوعات بدلًا من صناديق البريد. البحث يعيد وثائق، والاستخراج يعيد حقولًا بقيم مُطبَّعة يمكن لبرنامج أن يتصرف بناءً عليها، والزر الأزرق هو البرنامج وهو يتصرف.
Recall
List the fields the calendar extractor fills from Chris's email, and explain how 'tomorrow' becomes Jan-16-2012.اذكر الحقول التي يملؤها مستخرِج التقويم من بريد Chris، واشرح كيف تصبح «tomorrow» هي Jan-16-2012.
Quick checkاختبار سريع
How does the extractor turn 'tomorrow' into Jan-16-2012 on slide 12?كيف يحوّل المستخرِج «tomorrow» إلى Jan-16-2012 في الشريحة 12؟
Slide 13 puts a camera next to a list of the things people talk about when they review it: zoom, affordability, size and weight, flash, ease of use. Under "Size and weight" it collects three remarks: "nice and compact to carry!", "since the camera is small and light, I won't need to carry around those heavy, bulky professional cameras either!", and "the camera feels flimsy, is plastic and very light in weight you have to be very delicate in the handling of this camera". Read the second and third again. Both say the camera is light. Decide below whether each one is praise or complaint, then read on.
تضع الشريحة 13 كاميرا بجانب قائمة بالأشياء التي يتحدث عنها الناس عند تقييمها: التقريب (zoom)، والسعر المناسب (affordability)، والحجم والوزن (size and weight)، والفلاش (flash)، وسهولة الاستخدام (ease of use). وتحت «Size and weight» تجمع ثلاث ملاحظات: «nice and compact to carry!»، و«since the camera is small and light, I won't need to carry around those heavy, bulky professional cameras either!»، و«the camera feels flimsy, is plastic and very light in weight you have to be very delicate in the handling of this camera». اقرأ الثانية والثالثة مرة أخرى. كلتاهما تقول إن الكاميرا خفيفة. قرر في الأسفل هل كل منهما مدح أم شكوى، ثم تابع القراءة.
Decide the polarity of each review before revealing the marks the slide gives them.حدّد قطبية كل مراجعة قبل كشف العلامات التي تمنحها لها الشريحة.
nice and compact to carry!
since the camera is small and light, I won't need to carry around those heavy, bulky professional cameras either!
the camera feels flimsy, is plastic and very light in weight you have to be very delicate in the handling of this camera
The slide title pairs information extraction with sentiment analysis, and that pairing is the lesson. Bing Liu, whose book defined the field, states the principle: an opinion consists of a sentiment (positive or negative) and a target, and an opinion without its target being identified is of limited use. He calls the finer-grained task aspect level analysis, earlier called feature-based opinion mining after Hu and Liu's 2004 work on exactly this kind of camera review, and he formalises an opinion as a tuple of entity, aspect, sentiment, holder and time. Then he adds the line that explains the slide title: that tuple is basically a database schema. Sentiment analysis at this level is an extraction task first. Find the aspect, then judge the polarity of what was said about it.
عنوان الشريحة يقرن استخراج المعلومات (information extraction) بـ تحليل المشاعر (sentiment analysis)، وهذا الاقتران هو الدرس. يصوغ Bing Liu، الذي عرّف كتابه هذا المجال، المبدأ هكذا: الرأي يتكون من مشاعر (إيجابية أو سلبية) وهدف (target)، والرأي الذي لم يُحدَّد هدفه محدود الفائدة. ويسمي المهمة الأدق التحليل على مستوى الجانب (aspect)، وكانت تسمى سابقًا تنقيب الآراء المعتمد على الخصائص (feature-based opinion mining) نسبةً إلى عمل Hu وLiu عام 2004 على هذا النوع بالضبط من مراجعات الكاميرات، ويصوغ الرأي رسميًا على أنه صف (tuple) من الكيان والجانب والمشاعر وصاحب الرأي والزمن. ثم يضيف السطر الذي يفسر عنوان الشريحة: هذا الصف هو في الأساس مخطط قاعدة بيانات (database schema). تحليل المشاعر على هذا المستوى مهمة استخراج أولًا: اعثر على الجانب، ثم احكم على قطبية ما قيل عنه.
| Aspectالجانب | Sentenceالجملة | Cue wordsكلمات الدلالة | Polarityالقطبية |
|---|---|---|---|
| Size and weightالحجم والوزن | nice and compact to carry!«لطيفة وصغيرة الحجم، سهلة الحمل!» (nice and compact to carry!) | nice, compactnice، compact | positiveإيجابية |
| Size and weightالحجم والوزن | since the camera is small and light, I won't need to carry around those heavy, bulky professional cameras either!«بما أن الكاميرا صغيرة وخفيفة (small and light)، فلن أحتاج أيضًا إلى حمل تلك الكاميرات الاحترافية الثقيلة الضخمة!» | small, light, contrasted with heavy, bulkysmall، light، في مقابل heavy، bulky | positiveإيجابية |
| Size and weightالحجم والوزن | the camera feels flimsy, is plastic and very light in weight you have to be very delicate in the handling of this camera«تبدو الكاميرا هشّة (flimsy)، ومصنوعة من البلاستيك، وخفيفة جدًا في الوزن (very light in weight)، فعليك أن تتعامل معها بحذر شديد» | flimsy, plastic, very light in weight, delicateflimsy، plastic، very light in weight، delicate | negativeسلبية |
Now the word "light" can be explained rather than just noticed. In the second review it sits next to "small" and is set against "heavy, bulky professional cameras", so it means easy to carry. In the third it sits next to "flimsy", "plastic" and "delicate", so it means insubstantial. The physical fact is identical. The polarity is a property of the aspect and the context together, not of the word and not of the document. Liu's own camera example makes the mirror image point: "my wife thinks it is too heavy for her" is a negative opinion about weight, and nothing about the word "heavy" on its own tells you that.
الآن يمكن تفسير كلمة «light» بدلًا من مجرد ملاحظتها. في المراجعة الثانية تقع بجانب «small» وتُقابَل بـ «heavy, bulky professional cameras»، فهي تعني سهلة الحمل. وفي الثالثة تقع بجانب «flimsy» و«plastic» و«delicate»، فهي تعني واهية بلا متانة. الحقيقة الفيزيائية واحدة. القطبية خاصية للجانب والسياق معًا، لا للكلمة ولا للوثيقة. ومثال Liu نفسه عن الكاميرا يقدّم الصورة المعكوسة: «my wife thinks it is too heavy for her» رأي سلبي عن الوزن، ولا شيء في كلمة «heavy» وحدها يخبرك بذلك.
Aspects are not always spelled out either. Hu and Liu give the sentence "While light, it will not easily fit in pockets" and point out that the word size does not appear in it, so the system has to infer the aspect before it can score the opinion. Their illustrative summary for a digital camera counts opinions per feature, which is what the grey bars beside the slide's review list are sketching.
والجوانب لا تُذكر صراحةً دائمًا. يعطي Hu وLiu الجملة «While light, it will not easily fit in pockets» ويشيران إلى أن كلمة size لا تظهر فيها، فعلى النظام أن يستنتج الجانب قبل أن يقيّم الرأي. وملخصهما التوضيحي لكاميرا رقمية يعدّ الآراء لكل خاصية، وهذا ما ترسمه الأشرطة الرمادية بجانب قائمة المراجعات في الشريحة.
| Featureالخاصية | Positiveإيجابي | Negativeسلبي |
|---|---|---|
| picture qualityجودة الصورة (picture quality) | 253253 | 66 |
| sizeالحجم (size) | 134134 | 1010 |
- Find the sentences that express an opinion.اعثر على الجمل التي تعبّر عن رأي.
- Extract the aspect each opinion targets, explicit (flash) or implicit (light, therefore size and weight).استخرج الجانب الذي يستهدفه كل رأي، صريحًا (flash) أو ضمنيًا (light، أي الحجم والوزن).
- Classify the polarity of the opinion about that aspect, using the surrounding words.صنّف قطبية الرأي عن ذلك الجانب، مستعينًا بالكلمات المحيطة.
- Aggregate into per-aspect counts, so a reader sees two positive and one negative on size and weight.اجمعها في أعداد لكل جانب، فيرى القارئ رأيين إيجابيين ورأيًا سلبيًا واحدًا عن الحجم والوزن.
The order matters. A whole-document score would average the third review's complaint about build against whatever it praised elsewhere, perhaps affordability, and report a lukewarm three stars that helps nobody. Liu makes the same point with a restaurant: "although the service is not that great, I still love this restaurant" is positive about the restaurant and negative about the service, and a document-level system does not discover what exactly people liked and did not like.
الترتيب مهم. التقييم على مستوى الوثيقة كاملة سيأخذ متوسط شكوى المراجعة الثالثة من جودة التصنيع مع ما مدحته في مكان آخر، ربما السعر المناسب، ويعطي ثلاث نجوم فاترة لا تفيد أحدًا. ويطرح Liu النقطة نفسها بمثال مطعم: «although the service is not that great, I still love this restaurant» إيجابية تجاه المطعم وسلبية تجاه الخدمة، والنظام الذي يعمل على مستوى الوثيقة لا يكتشف ما الذي أعجب الناس بالضبط وما الذي لم يعجبهم.
Recall
Why is 'light' positive in one camera review and negative in another?لماذا تكون «light» إيجابية في مراجعة كاميرا وسلبية في أخرى؟
Recall
Which systems in this part are pipelines of several NLP components?أي الأنظمة في هذا الجزء سلاسل معالجة من عدة مكوّنات NLP؟
Quick checkاختبار سريع
In the camera reviews, 'light' is positive once and negative once. What does that show?في مراجعات الكاميرا، جاءت «light» إيجابية مرة وسلبية مرة. ماذا يُظهر ذلك؟
Recapالخلاصة
If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا
- Machine translation has two modes: fully automatic for information access, and computer-aided (post-editing or interactive prediction) when a human owns the final text.للترجمة الآلية نمطان: آلي بالكامل للوصول إلى المعلومات، وبمساعدة الحاسوب (التحرير اللاحق post-editing أو التنبؤ التفاعلي) عندما يكون الإنسان هو المسؤول عن النص النهائي.
- Slide 8's categories are still the right ones to learn; the counts are a historical snapshot, not a fact sheet. Learn the modes (typing, offline, camera, conversation, voice calls), not the numbers: Google Translate passed 240 languages in 2024 and Skype was retired on 5 May 2025.فئات الشريحة 8 ما زالت هي الصحيحة للحفظ، أما الأعداد فهي لقطة تاريخية وليست مرجعًا للحقائق. احفظ الأنماط (الكتابة، دون اتصال، الكاميرا، المحادثة، المكالمات الصوتية) لا الأرقام: تجاوز Google Translate حاجز 240 لغة في 2024، وأُوقف Skype في 5 مايو 2025.
- Camera and conversation translation are pipelines: OCR or speech recognition, then MT, then rendering or speech synthesis. Each stage can inject error.ترجمة الكاميرا وترجمة المحادثة سلاسل معالجة (pipelines): التعرف الضوئي على الحروف OCR أو التعرف على الكلام، ثم الترجمة الآلية MT، ثم العرض أو توليد الكلام. وكل مرحلة قد تُدخل خطأً.
- A factual answer box needs word sense disambiguation (heavy means mass), entity linking (our planet means Earth) and a knowledge graph lookup (5.972 × 10^24 kg).صندوق الإجابة الحقائقية يحتاج إلى إزالة غموض معنى الكلمة (heavy تعني الكتلة)، وربط الكيان (our planet تعني الأرض)، والبحث في رسم المعرفة (5.972 × 10^24 kg).
- An AI Overview is retrieval-augmented generation: retrieve pages, prompt an LLM, cite. Its new failure mode is fluent text that is not faithful to the facts or its cited sources.الـ AI Overview هو توليد معزّز بالاسترجاع: استرجع الصفحات، ثم مرّرها في prompt إلى نموذج لغوي كبير LLM، ثم استشهد بالمصادر. ونمط الفشل الجديد فيه نص سلس لكنه غير أمين للحقائق أو للمصادر التي يستشهد بها.
- Non-word errors (ofcourse) fail dictionary lookup. Real-word errors (then for than) pass it and need context. Between 25 and 40 percent of spelling errors are real words.أخطاء الكلمات غير الموجودة (ofcourse) تفشل في البحث في القاموس. أما أخطاء الكلمات الحقيقية (then بدل than) فتنجح فيه وتحتاج إلى السياق. وما بين 25 و40 بالمئة من أخطاء الإملاء كلمات حقيقية.
- Information extraction fills a template: Event, Date, Start, End, Where. 'tomorrow' is normalised as the email date plus one day, Jan-16-2012.استخراج المعلومات يملأ قالبًا: Event وDate وStart وEnd وWhere. وتُحوَّل «tomorrow» إلى تاريخ البريد زائد يوم واحد، أي Jan-16-2012.
- Sentiment is a pair of target and polarity. The same word 'light' is positive next to 'compact' and negative next to 'flimsy', so extract the aspect first, then classify.المشاعر زوج من هدف (target) وقطبية (polarity). الكلمة نفسها «light» إيجابية بجانب «compact» وسلبية بجانب «flimsy»، لذلك استخرج الجانب أولًا ثم صنّف.
Sourcesالمصادر
- Speech and Language Processing, 3rd edition draftBookStanford University (Jurafsky and Martin)Draft of August 2026; the chapters below are its PDF sectionsمسودة أغسطس 2026، والفصول أدناه هي أقسامها بصيغة PDF(opens in a new tab)(يفتح في تبويب جديد)
- Chapter 13: Machine TranslationBookJurafsky and Martin, StanfordInformation access, post-editing and CAT, OCR-then-MT, hundreds of billions of words a dayالوصول إلى المعلومات، والتحرير اللاحق (post-editing) والترجمة بمساعدة الحاسوب CAT، وOCR ثم MT، ومئات المليارات من الكلمات يوميًا(opens in a new tab)(يفتح في تبويب جديد)
- Chapter 11: Information Retrieval and Retrieval-Augmented GenerationBookJurafsky and Martin, StanfordRAG algorithm, knowledge citation, hallucination, 69 to 88 percent in the legal domain, calibrationخوارزمية RAG، والاستشهاد بالمعرفة، والهلوسة (hallucination)، ونسبة 69 إلى 88 بالمئة في المجال القانوني، والمعايرة (calibration)(opens in a new tab)(يفتح في تبويب جديد)
- Chapter 21: Information Extraction: Relations, Events, and TimeBookJurafsky and Martin, StanfordIE definition, template filling, temporal anchor, tomorrow adds a day, exercise on calendar entries from emailتعريف استخراج المعلومات IE، وملء القوالب (template filling)، والمرساة الزمنية (temporal anchor)، و«tomorrow» تضيف يومًا، وتمرين على إنشاء مواعيد تقويم من البريد الإلكتروني(opens in a new tab)(يفتح في تبويب جديد)
- Appendix D: Spelling Correction and the Noisy ChannelBookJurafsky and Martin, StanfordNon-word versus real-word errors, 25 to 40 percent, single-letter changes, noisy channelأخطاء الكلمات غير الموجودة (non-word) مقابل أخطاء الكلمات الحقيقية (real-word)، ونسبة 25 إلى 40 بالمئة، والتغييرات بحرف واحد، والقناة المشوّشة (noisy channel)(opens in a new tab)(يفتح في تبويب جديد)
- Statistical Approaches to Computer-Assisted TranslationPaperComputational Linguistics, 2009 (Barrachina et al.)Prefix validated by the human, system proposes the best or n-best suffix; MT output still needs editingبادئة يعتمدها الإنسان، ويقترح النظام أفضل لاحقة أو أفضل n لواحق (n-best)، ومخرجات الترجمة الآلية MT ما زالت تحتاج إلى تحرير(opens in a new tab)(يفتح في تبويب جديد)
- 110 new languages are coming to Google TranslateArticleGoogle, 27 June 2024PaLM 2, largest expansion ever, 614 million speakersPaLM 2، أكبر توسعة على الإطلاق، 614 مليون متحدث(opens in a new tab)(يفتح في تبويب جديد)
- Google Translate adds support for 110 languagesArticleTechCrunch, 27 June 2024Total of 243 languages after the expansionإجمالي 243 لغة بعد التوسعة(opens in a new tab)(يفتح في تبويب جديد)
- Download and use Google TranslateDocsGoogle Translate HelpOver 200 languages for text, handwriting, photos and speechأكثر من 200 لغة للنص وخط اليد والصور والكلام(opens in a new tab)(يفتح في تبويب جديد)
- The next chapter: Moving from Skype to Microsoft TeamsArticleMicrosoft 365 Blog, 28 February 2025Skype retired in May 2025 in favour of Teamsأُوقف Skype في مايو 2025 لصالح Teams(opens in a new tab)(يفتح في تبويب جديد)
- Skype is retiring in May 2025: what you need to knowDocsMicrosoft SupportAs of 5 May 2025, Skype is retiredاعتبارًا من 5 مايو 2025، أُوقف Skype(opens in a new tab)(يفتح في تبويب جديد)
- Introducing the Knowledge Graph: things, not stringsArticleGoogle, 16 May 2012 (Amit Singhal)Entities and their relationships; Taj Mahal the monument or the musicianالكيانات والعلاقات بينها، و«Taj Mahal» المعلم الأثري أم الموسيقي(opens in a new tab)(يفتح في تبويب جديد)
- Generative AI in Search: Let Google do the searching for youArticleGoogle, 14 May 2024AI Overviews rolling out to everyone in the USإتاحة AI Overviews للجميع في الولايات المتحدة(opens in a new tab)(يفتح في تبويب جديد)
- AI in Search: Going beyond information to intelligenceArticleGoogle, 20 May 2025AI Mode rolling out in the USإتاحة AI Mode في الولايات المتحدة(opens in a new tab)(يفتح في تبويب جديد)
- Planetary Fact SheetDocsNASA NSSDCAMasses in units of 10^24 kg; ratio table gives Venus 0.815, Mars 0.107, Jupiter 317.8الكتل بوحدة 10^24 kg، وجدول النسب يعطي الزهرة 0.815، والمريخ 0.107، والمشتري 317.8(opens in a new tab)(يفتح في تبويب جديد)
- Earth Fact SheetDocsNASA NSSDCAMass 5.9722 × 10^24 kg; Mars, Venus and Jupiter fact sheets on the same siteالكتلة 5.9722 × 10^24 kg، وصحائف بيانات المريخ والزهرة والمشتري على الموقع نفسه(opens in a new tab)(يفتح في تبويب جديد)
- How Much Does Earth Weigh?ArticleAIP Inside Science, 19 August 2021The source cited by the AI Overview on slide 10; 13 thousand, 170 billion trillion poundsالمصدر الذي استشهد به AI Overview في الشريحة 10، و13 ألفًا و170 مليار تريليون رطل(opens in a new tab)(يفتح في تبويب جديد)
- Check spelling and grammar in OfficeDocsMicrosoft SupportRed squiggle for spelling, blue squiggle for grammarخط متعرج أحمر للإملاء، وخط متعرج أزرق للنحو(opens in a new tab)(يفتح في تبويب جديد)
- Sentiment Analysis and Opinion MiningBookMorgan and Claypool, 2012 (Bing Liu, author draft)Aspect level, opinion as a tuple that is basically a database schema, camera weight and restaurant examplesمستوى الجانب (aspect level)، والرأي بوصفه صفًا (tuple) هو في الأساس مخطط قاعدة بيانات، وأمثلة وزن الكاميرا والمطعم(opens in a new tab)(يفتح في تبويب جديد)
- Mining and Summarizing Customer ReviewsPaperKDD 2004 (Hu and Liu)Feature-based summary of digital camera reviews; 'While light, it will not easily fit in pockets'ملخص قائم على الخصائص لمراجعات الكاميرات الرقمية، و«While light, it will not easily fit in pockets»(opens in a new tab)(يفتح في تبويب جديد)