ICS 582Lecture 05المحاضرة 05Part 02الجزء 02
The noisy channel modelنموذج القناة المشوشة (Noisy channel)
Treat the misspelling as a correct word sent through a noisy channel, then decode with Bayes' rule: pick the word that maximizes channel probability times prior.نعامل الخطأ الإملائي على أنه كلمة صحيحة أُرسلت عبر قناة مشوشة، ثم نفك الترميز بقاعدة Bayes: نختار الكلمة التي تعظّم احتمال القناة مضروبا في الاحتمال المسبق (prior).
- Conceptsالمفاهيم
- 3
- Slidesالشرائح
- 9-12
- Readingمدة القراءة
- 18 min18 دقيقة
Why this part mattersلماذا يهمّ هذا الجزء
Part 01 split spelling errors into non-words and real words. This part gives you the single idea that powers almost every correction method in the rest of the lecture: treat the misspelling as a damaged copy of the word the writer meant, and ask which intended word most probably produced that damage.
The ideas build in order. First the picture: a word goes into a noisy channel and comes out wrong, and a decoder works backwards. Second the mathematics: one line of Bayes' rule, one cancellation, and the formula you must be able to derive in an exam. Third the context: who proposed it, and why the very same equation appears in speech recognition and machine translation. Every later part of this lecture (candidate generation, the confusion matrices, the acress scores, real-word errors) is just a way of filling in one factor of this formula.
قسّم الجزء 01 الأخطاء الإملائية إلى أخطاء ينتج عنها ما ليس بكلمة (non-words) وأخطاء ينتج عنها كلمات حقيقية (real words). أما هذا الجزء فيعطيك الفكرة الواحدة التي تقوم عليها تقريبًا كل طرق التصحيح في بقية المحاضرة: تعامل مع الخطأ الإملائي على أنه نسخة تالفة من الكلمة التي قصدها الكاتب، ثم اسأل: أي كلمة مقصودة هي الأرجح أن تكون قد أنتجت هذا التلف؟
تُبنى الأفكار بالترتيب. أولًا الصورة: كلمة تدخل قناة مشوّشة (noisy channel) وتخرج خاطئة، وفاكّ ترميز (decoder) يعمل بالاتجاه المعاكس. ثانيًا الرياضيات: سطر واحد من قاعدة بايز (Bayes' rule)، وحذف واحد، والصيغة التي يجب أن تستطيع اشتقاقها في الاختبار. ثالثًا السياق: من اقترحها، ولماذا تظهر المعادلة نفسها تمامًا في التعرف على الكلام والترجمة الآلية. وكل جزء لاحق في هذه المحاضرة (توليد المرشحين، ومصفوفات الالتباس، ودرجات acress، وأخطاء الكلمات الحقيقية) ما هو إلا طريقة لملء أحد عاملَي هذه الصيغة.
By the end you canفي نهاية هذا الجزء ستستطيع
- Describe spelling correction as decoding: a correct word w passes through a noisy channel and comes out as the observed string x.أن تصف تصحيح الإملاء بأنه عملية فك ترميز (decoding): كلمة صحيحة w تمر عبر قناة مشوّشة (noisy channel) فتخرج على شكل النص المُلاحَظ x.
- Derive the noisy channel rule line by line, from argmax P(w|x) through Bayes' rule to argmax P(x|w) P(w).أن تشتق قاعدة القناة المشوّشة سطرًا بسطر، من argmax P(w|x) مرورًا بقاعدة بايز (Bayes' rule) وصولًا إلى argmax P(x|w) P(w).
- Explain exactly why P(x) can be dropped, and why the answer does not change when it is.أن تشرح بدقة لماذا يمكن حذف P(x)، ولماذا لا تتغير الإجابة عند حذفه.
- Name the two factors (channel or error model, and language model prior) and say what data each one is learned from.أن تسمّي العاملين (نموذج القناة أو نموذج الخطأ، والاحتمال المسبق من نموذج اللغة) وتذكر من أي بيانات يُتعلَّم كل منهما.
- Place the model in history (Kernighan, Church and Gale 1990; Mays, Damerau and Mercer 1991) and recognise it in speech recognition and machine translation.أن تضع النموذج في سياقه التاريخي (Kernighan وChurch وGale سنة 1990؛ Mays وDamerau وMercer سنة 1991) وأن تتعرّف عليه في التعرف على الكلام والترجمة الآلية.
Someone types acress. You know at once that this is not an English word. But what did they mean? Maybe actress with the t dropped, maybe across with an e in place of the o, maybe acres with an extra s. You cannot see inside the writer's head. All you have is the damaged string and your knowledge of how people type and what people usually write.
يكتب شخص ما acress. تعرف فورًا أنها ليست كلمة إنجليزية. لكن ماذا قصد؟ ربما actress وقد سقط منها حرف t، وربما across مع e مكان o، وربما acres مع s زائدة. لا يمكنك أن ترى ما في رأس الكاتب. كل ما لديك هو النص التالف، ومعرفتك بكيف يكتب الناس وبما يكتبونه عادةً.
The channel distorts, the decoder reasons backwardsالقناة تشوّه، وفاكّ الترميز يستنتج بالاتجاه المعاكس
The noisy channel model turns that intuition into a model. Imagine the writer's intended word as a clean message. On its way to the page it passes through a channel: tired fingers, a cramped keyboard, a shaky memory of the spelling. The channel adds noise in the form of substituted, inserted, deleted or swapped letters. What arrives is the observed string, which we call . The word that was sent we call .
يحوّل noisy channel model (نموذج القناة المشوّشة) هذا الحدس إلى نموذج. تخيّل الكلمة التي قصدها الكاتب رسالةً نظيفة. في طريقها إلى الورق تمر عبر قناة: أصابع متعبة، ولوحة مفاتيح ضيقة، وذاكرة مهزوزة للتهجئة. تضيف القناة تشويشًا على شكل حروف مستبدلة أو مُدرجة أو محذوفة أو متبادلة المواقع. وما يصل هو النص المُلاحَظ، ونسمّيه . أما الكلمة التي أُرسلت فنسمّيها .
Correction runs the picture in reverse. The decoder takes each hypothesis word from the vocabulary, imagines sending it through a model of the same channel, and asks how likely that word is to come out looking like acress. It also asks how likely the word was to be written in the first place. The hypothesis that best explains the noise, weighed by how common it is, becomes the guess. So there are two directions: the channel runs forward from intention to typing, and the decoder runs backward from the typed string to the intention, pushing every hypothesis through its own copy of the channel to see which noisy output matches.
التصحيح يشغّل الصورة بالعكس. يأخذ decoder (فاكّ الترميز) كل كلمة فرضية من المفردات، ويتخيّل إرسالها عبر نموذج للقناة نفسها، ويسأل: ما مدى احتمال أن تخرج هذه الكلمة على شكل acress؟ ويسأل أيضًا: ما مدى احتمال أن تُكتب هذه الكلمة أصلًا؟ والفرضية التي تفسّر التشويش أفضل تفسير، موزونةً بمدى شيوعها، تصبح هي التخمين. إذن هناك اتجاهان: القناة تسير إلى الأمام من النية إلى الكتابة، وفاكّ الترميز يسير إلى الخلف من النص المكتوب إلى النية، فيدفع كل فرضية عبر نسخته الخاصة من القناة ليرى أي مخرج مشوّش يطابق ما رأيناه.
What the writer meant. Hidden from us.
ما قصده الكاتب، وهو مخفي عنا.
Adds noise: a letter is dropped, added, replaced or swapped.
تضيف تشويشًا: يُحذف حرف أو يُضاف أو يُستبدل أو يُبدَّل موضعه مع جاره.
The only thing the corrector actually sees.
الشيء الوحيد الذي يراه المصحِّح فعلًا.
The decoder tries each w in V, scores P(x|w) P(w), and keeps the best: our estimate of the hidden word.
يجرّب فاكّ الترميز كل w في V، ويحسب P(x|w) P(w)، ويحتفظ بالأفضل: وهو تقديرنا للكلمة المخفية.
Notice what the decoder needs. It needs a list of hypotheses to try, which in practice is not the whole vocabulary but a short list of nearby words (that is candidate generation, part 03). It needs a model of the channel, so it can say how likely each hypothesis is to turn into . And it needs a sense of which words people actually use. The next concept shows that these last two needs are exactly the two factors that fall out of Bayes' rule.
لاحظ ما يحتاجه فاكّ الترميز. يحتاج قائمة فرضيات يجرّبها، وهي في الواقع ليست المفردات كلها بل قائمة قصيرة من الكلمات القريبة (وهذا هو candidate generation، أي توليد المرشحين، في الجزء 03). ويحتاج نموذجًا للقناة، ليقول ما مدى احتمال أن تتحول كل فرضية إلى . ويحتاج إحساسًا بالكلمات التي يستخدمها الناس فعلًا. والمفهوم التالي يبيّن أن هاتين الحاجتين الأخيرتين هما بالضبط العاملان اللذان يخرجان من قاعدة بايز.
Recall
In the noisy channel picture, what is hidden, what is observed, and what does the decoder do?في صورة القناة المشوّشة، ما الخفي، وما المُلاحَظ، وماذا يفعل فاكّ الترميز؟
Return to acress. If you could read off, for each candidate word, the probability that it was the intended word given that we saw acress, you would just pick the biggest. That probability is , and the whole derivation on slide 11 is about turning it into things we can actually estimate.
عُد إلى acress. لو استطعت أن تقرأ لكل كلمة مرشحة احتمال أن تكون هي الكلمة المقصودة بشرط أننا رأينا acress، لاخترت الأكبر ببساطة. هذا الاحتمال هو ، والاشتقاق كله في الشريحة 11 يدور حول تحويله إلى أشياء نستطيع تقديرها فعلًا.
Step 1: state the goalالخطوة 1: حدّد الهدف
Out of every word in the vocabulary , pick the one with the highest probability given the observation . The hat on means “our estimate of the correct word”, and argmax means “the argument that makes this largest”, so it returns a word, not a probability.
من بين كل الكلمات في المفردات ، اختر الكلمة ذات الاحتمال الأعلى بشرط الملاحظة . القبعة فوق تعني «تقديرنا للكلمة الصحيحة»، وargmax تعني «القيمة (المُدخَل) التي تجعل هذا المقدار أكبر ما يمكن»، لذلك فهي تعيد كلمة لا احتمالًا.
Step 2: apply Bayes' ruleالخطوة 2: طبّق قاعدة بايز
Bayes' rule rewrites any conditional probability by flipping it: . With and , the posterior we cannot estimate directly becomes a product of two things we can, divided by a third.
تعيد Bayes' rule (قاعدة بايز) كتابة أي احتمال شرطي بقلبه: . ومع و، يصبح الاحتمال اللاحق (posterior) الذي لا نستطيع تقديره مباشرةً حاصلَ ضرب شيئين نستطيع تقديرهما، مقسومًا على شيء ثالث.
Step 3: drop P(x), and know whyالخطوة 3: احذف P(x)، واعرف السبب
The denominator is the probability of the observed string itself. When we compare candidates, we compare them for the same : we are always asking which word best explains acress, never a different string. So is one fixed positive number, shared by every candidate. Dividing every score by the same positive number shrinks or stretches all of them equally; it cannot change which one is largest. The argmax is unchanged, so we drop the denominator.
المقام هو احتمال النص المُلاحَظ نفسه. عندما نقارن المرشحين، نقارنهم على نفسه: نحن نسأل دائمًا أي كلمة تفسّر acress أفضل تفسير، ولا نسأل أبدًا عن نص آخر. إذن عدد موجب ثابت واحد يشترك فيه كل المرشحين. وقسمة كل الدرجات على العدد الموجب نفسه تصغّرها أو تكبّرها جميعًا بالنسبة نفسها، ولا يمكن أن تغيّر أيّها الأكبر. قيمة argmax لا تتغير، لذلك نحذف المقام.
There is a practical bonus. Computing properly would mean summing over every possible . Dropping it saves that whole sum. The price is that the remaining scores are no longer probabilities that add to one; they are only useful for ranking. That is all the corrector needs.
وهناك فائدة عملية إضافية. حساب بشكل صحيح يعني جمع على كل ممكنة. وحذفه يوفّر هذا المجموع كله. والثمن أن الدرجات المتبقية لم تعد احتمالات مجموعها واحد؛ فهي مفيدة للترتيب فقط. وهذا كل ما يحتاجه المصحّح.
Worked exampleمثال محلول
Check the cancellation with real numbers for acressتحقّق من الحذف بأرقام حقيقية لـ acress
Take three candidates and their scoresخذ ثلاثة مرشحين ودرجاتهم
Jurafsky and Martin (Appendix D, Fig. D.5) give, for acress with a unigram prior: actress has and , so the product is 2.7 × 10⁻⁹. across has 0.0000093 × 0.000299 ≈ 2.8 × 10⁻⁹. access has 0.000000209 × 0.0000916 ≈ 0.019 × 10⁻⁹.يعطي Jurafsky وMartin (الملحق D، الشكل D.5) القيم التالية لـ acress مع احتمال مسبق أحادي (unigram prior): actress لها و، فحاصل الضرب 2.7 × 10⁻⁹. وacross لها 0.0000093 × 0.000299 ≈ 2.8 × 10⁻⁹. وaccess لها 0.000000209 × 0.0000916 ≈ 0.019 × 10⁻⁹.Rank by the product aloneرتّب بحاصل الضرب وحده
2.8 > 2.7 > 0.019, so the ranking is across, then actress, then access.2.8 > 2.7 > 0.019، إذن الترتيب: across أولًا، ثم actress، ثم access.Now divide by P(x)الآن اقسم على P(x)
Restrict attention to these three words for illustration, so P(x) ≈ 2.7 + 2.8 + 0.019 = 5.519 × 10⁻⁹. The posteriors become 2.7 / 5.519 ≈ 0.489, 2.8 / 5.519 ≈ 0.507 and 0.019 / 5.519 ≈ 0.003.اقصر الانتباه على هذه الكلمات الثلاث للتوضيح، فيكون P(x) ≈ 2.7 + 2.8 + 0.019 = 5.519 × 10⁻⁹. وتصبح الاحتمالات اللاحقة 2.7 / 5.519 ≈ 0.489 و2.8 / 5.519 ≈ 0.507 و0.019 / 5.519 ≈ 0.003.Resultالنتيجة
The posteriors sum to one and are easier to read, but the order is identical: across still wins. Dividing by changed every number and no ranking. (That across beats the intended actress here is a weakness of the unigram prior, not of the rule; part 05 fixes it with context.)مجموع الاحتمالات اللاحقة واحد، وهي أسهل في القراءة، لكن الترتيب مطابق تمامًا: across ما زالت تفوز. القسمة على غيّرت كل الأرقام ولم تغيّر أي ترتيب. (وفوز across هنا على الكلمة المقصودة actress نقطة ضعف في الاحتمال المسبق الأحادي unigram، لا في القاعدة؛ والجزء 05 يصلح ذلك بالسياق.)
Name the two factorsسمِّ العاملين
What survives is a product of two very different pieces of knowledge. Learn the names; exams use all of them interchangeably.
ما يتبقى هو حاصل ضرب نوعين مختلفين جدًا من المعرفة. احفظ الأسماء؛ فالاختبارات تستخدمها كلها بالتبادل.
| Factorالعامل | Namesالأسماء | What it knowsما الذي يعرفه | Learned fromيُتعلَّم من |
|---|---|---|---|
| P(x | w)P(x | w) | Channel model, also called the error model or likelihoodنموذج القناة، ويسمّى أيضًا نموذج الخطأ (error model) أو الاحتمال الشرطي (likelihood) | How the writer turns an intended word into typed letters: slips, swapped keys, dropped lettersكيف يحوّل الكاتب الكلمة المقصودة إلى حروف مكتوبة: الزلّات، والمفاتيح المتبادلة، والحروف الساقطة | Error corpora, such as lists of misspellings paired with their correctionsمدوّنات الأخطاء (error corpora)، مثل قوائم الأخطاء الإملائية مقرونةً بتصحيحاتها |
| P(w)P(w) | Language model, the priorنموذج اللغة، أي الاحتمال المسبق (prior) | How often the word, or the word in this context, appears in the languageمدى تكرار الكلمة في اللغة، أو مدى تكرارها في هذا السياق | Plain text, for example unigram or bigram counts from a large corpusالنص العادي، مثل أعداد unigram أو bigram من مدوّنة نصية كبيرة |
is the channel model, also called the error model, and in Bayesian language the likelihood. It is about typing: how likely is a writer who meant actress to produce acress? Part 04 estimates it from a confusion matrix of real typing mistakes. is the prior probability, supplied by a language model. It is about the language: how common is actress as a word, or after the word that precedes it? This is exactly the n-gram machinery of lecture 03; a unigram prior uses single-word counts, a bigram language model brings in the previous word.
الحد هو channel model (نموذج القناة)، ويسمّى أيضًا نموذج الخطأ (error model)، وفي لغة بايز هو الاحتمال الشرطي (likelihood). موضوعه الكتابة: ما مدى احتمال أن يكتب شخص قصد actress النص acress؟ والجزء 04 يقدّره من confusion matrix (مصفوفة الالتباس) لأخطاء كتابة حقيقية. أما فهو prior probability (الاحتمال المسبق)، ويوفّره نموذج لغة. موضوعه اللغة: ما مدى شيوع actress كلمةً، أو بعد الكلمة التي تسبقها؟ وهذه بالضبط آلية n-gram من المحاضرة 03؛ فـ unigram prior يستخدم أعداد الكلمات المفردة، وbigram language model يُدخل الكلمة السابقة في الحساب.
Recall
Which factor knows about typing, and which knows about the language?أي العاملين يعرف عن الكتابة على لوحة المفاتيح، وأيهما يعرف عن اللغة؟
Recall
Without looking, derive ŵ from argmax P(w|x) and justify each step.دون أن تنظر، اشتقّ ŵ من argmax P(w|x) وبرّر كل خطوة.
Quick checkاختبار سريع
Why can P(x) be dropped when choosing the best correction for a typo?لماذا يمكن حذف P(x) عند اختيار أفضل تصحيح لخطأ إملائي؟
Quick checkاختبار سريع
A phone keyboard replaces a laptop keyboard. Which term of ŵ = argmax P(x|w)P(w) must be re-estimated?استُبدلت لوحة مفاتيح الحاسوب المحمول بلوحة مفاتيح هاتف. أي حد في ŵ = argmax P(x|w)P(w) يجب إعادة تقديره؟
The noisy channel did not start with spelling. Shannon modelled communication as a source passing through a noisy channel in 1948, and IBM researchers combined a prior with a likelihood for optical character recognition in the 1960s. Spelling correction adopted the full prior times likelihood recipe around 1990, at two labs almost at the same time.
لم تبدأ القناة المشوّشة مع الإملاء. فقد نمذج Shannon الاتصال على أنه مصدر يمر عبر قناة مشوّشة سنة 1948، وجمع باحثو IBM بين احتمال مسبق واحتمال شرطي في التعرف الضوئي على الحروف (OCR) في 1960s (الستينيات). وتبنّى تصحيح الإملاء الوصفة الكاملة، الاحتمال المسبق مضروبًا في الاحتمال الشرطي، نحو سنة 1990، في مختبرين في الوقت نفسه تقريبًا.
- AT&T Bell Labs. Kernighan, Church and Gale, “A spelling correction program based on a noisy channel model”, COLING 1990. They scored candidates for non-word errors with a channel model built from confusion counts, the Kernighan, Church and Gale channel model you will compute in part 04 for the acress example.AT&T Bell Labs. Kernighan وChurch وGale، «A spelling correction program based on a noisy channel model»، COLING 1990. أعطوا درجات للمرشحين في أخطاء الكلمات غير الموجودة (non-word errors) باستخدام نموذج قناة مبني من أعداد الالتباس (confusion counts)، وهو Kernighan, Church and Gale channel model الذي ستحسبه في الجزء 04 لـ acress example.
- IBM. Mays, Damerau and Mercer, “Context based spelling correction”, Information Processing and Management 27(5), 517 to 522, 1991. They generated candidate sentences by editing each word, scored them with a word language model as the prior, and so applied the channel idea to every word in a sentence. That is how real-word errors are handled in part 06.IBM. Mays وDamerau وMercer، «Context based spelling correction»، Information Processing and Management 27(5), 517 to 522، 1991. ولّدوا جملًا مرشحة بتعديل كل كلمة، وأعطوها درجات باستخدام نموذج لغة على مستوى الكلمات بوصفه الاحتمال المسبق، فطبّقوا بذلك فكرة القناة على كل كلمة في الجملة. وهكذا تُعالَج real-word errors (أخطاء الكلمات الحقيقية) في الجزء 06.
One equation, three fieldsمعادلة واحدة، ثلاثة مجالات
Strip away the word “spelling” and the rule says: to recover a hidden source from a noisy observation, multiply a model of how the source gets distorted by a model of what sources are likely. That recipe is the backbone of classical speech recognition and of the IBM statistical machine translation models. Brown, Della Pietra, Della Pietra and Mercer (1993) call the Fundamental Equation of Machine Translation, derived exactly as on slide 11: Bayes' rule, then drop the denominator because it does not depend on .
انزع كلمة «إملاء» وستجد القاعدة تقول: لاستعادة مصدر خفي من ملاحظة مشوّشة، اضرب نموذجًا لكيفية تشوّه المصدر في نموذج لما هو مرجّح من المصادر. هذه الوصفة هي العمود الفقري للتعرف على الكلام الكلاسيكي ولنماذج الترجمة الآلية الإحصائية من IBM. ويسمّي Brown وDella Pietra وDella Pietra وMercer (1993) الصيغة «المعادلة الأساسية للترجمة الآلية» (Fundamental Equation of Machine Translation)، وتُشتق تمامًا كما في الشريحة 11: قاعدة بايز، ثم حذف المقام لأنه لا يعتمد على .
| Taskالمهمة | Observedالمُلاحَظ | Hidden sourceالمصدر الخفي | Channel modelنموذج القناة | Priorالاحتمال المسبق |
|---|---|---|---|---|
| Spelling correctionتصحيح الإملاء | Typed string xالنص المكتوب x | Intended word wالكلمة المقصودة w | P(x | w)P(x | w) | P(w)P(w) |
| Speech recognitionالتعرف على الكلام | Audio signalالإشارة الصوتية | Word sequenceتسلسل الكلمات | Acoustic model P(audio | words)النموذج الصوتي P(audio | words) | Language model P(words)نموذج اللغة P(words) |
| Machine translationالترجمة الآلية | French sentence fالجملة الفرنسية f | English sentence eالجملة الإنجليزية e | Translation model Pr(f | e)نموذج الترجمة Pr(f | e) | Language model Pr(e)نموذج اللغة Pr(e) |
In all three, the prior is a language model, the very n-gram model from lecture 03. That is why one good language model can be reused across spelling, speech and translation, while each task brings its own channel. It also explains how this lecture is organised: parts 03 and 04 build the channel side, parts 04 and 05 the language model side, and parts 06 to 08 extend the same product to context and to real systems.
في المهام الثلاث كلها، الاحتمال المسبق نموذج لغة، وهو نموذج n-gram نفسه من المحاضرة 03. ولهذا يمكن إعادة استخدام نموذج لغة جيد واحد في الإملاء والكلام والترجمة، بينما تأتي كل مهمة بقناتها الخاصة. وهذا يفسّر أيضًا تنظيم هذه المحاضرة: الجزآن 03 و04 يبنيان جانب القناة، والجزآن 04 و05 جانب نموذج اللغة، والأجزاء من 06 إلى 08 توسّع حاصل الضرب نفسه ليشمل السياق والأنظمة الحقيقية.
Recall
In speech recognition, what plays the role of P(x|w) and what plays the role of P(w)?في التعرف على الكلام، ما الذي يؤدي دور P(x|w)، وما الذي يؤدي دور P(w)؟
Quick checkاختبار سريع
In statistical translation from French f into English e, what plays the role of P(w)?في الترجمة الإحصائية من الفرنسية f إلى الإنجليزية e، ما الذي يؤدي دور P(w)؟
Recapالخلاصة
If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا
- The noisy channel view: the writer meant a correct word w, the typing process distorted it, and we observe x. Correction means recovering w from x.منظور القناة المشوّشة: قصد الكاتب كلمة صحيحة w، فشوّهتها عملية الكتابة، ونحن نلاحظ x. التصحيح يعني استعادة w من x.
- The decoder runs every hypothesis w through a model of the channel and keeps the one most likely to have produced x.يمرّر فاكّ الترميز (decoder) كل فرضية w عبر نموذج للقناة، ويحتفظ بالفرضية الأرجح أن تكون قد أنتجت x.
- Start from ŵ = argmax over w in V of P(w|x). Bayes' rule rewrites P(w|x) as P(x|w) P(w) / P(x).نبدأ من ŵ = argmax على كل w في V لـ P(w|x). قاعدة بايز تعيد كتابة P(w|x) على شكل P(x|w) P(w) / P(x).
- P(x) is the same number for every candidate, because x is fixed. Dividing every score by the same positive number cannot change which one is largest, so P(x) is dropped.قيمة P(x) هي العدد نفسه لكل مرشح، لأن x ثابت. وقسمة كل الدرجات على العدد الموجب نفسه لا يمكن أن تغيّر أيّها الأكبر، لذلك نحذف P(x).
- Final rule: ŵ = argmax P(x|w) P(w). P(x|w) is the channel or error model (likelihood, knows about typing). P(w) is the language model (prior, knows about the language).القاعدة النهائية: ŵ = argmax P(x|w) P(w). الحد P(x|w) هو نموذج القناة أو نموذج الخطأ (الاحتمال الشرطي likelihood، ويعرف عن الكتابة على لوحة المفاتيح). والحد P(w) هو نموذج اللغة (الاحتمال المسبق prior، ويعرف عن اللغة).
- We estimate the two factors separately because each is learned from different data: error corpora for P(x|w), plain text for P(w).نقدّر العاملين كلًّا على حدة لأن كل واحد منهما يُتعلَّم من بيانات مختلفة: مدوّنات الأخطاء (error corpora) لـ P(x|w)، والنص العادي لـ P(w).
- The same decomposition drives speech recognition and statistical machine translation. For spelling it was proposed around 1990 at AT&T Bell Labs and IBM.التفكيك نفسه هو ما يقود التعرف على الكلام والترجمة الآلية الإحصائية. وفي الإملاء اقتُرح نحو سنة 1990 في مختبرات AT&T Bell Labs وفي IBM.
Sourcesالمصادر
- Speech and Language Processing, 3rd edition draft, appendix D: Spelling Correction and the Noisy ChannelBookJurafsky and Martin, Stanford UniversitySection D.1: Fig. D.1, equations D.1 to D.5, why P(x) is dropped, channel model and prior; Fig. D.5 acress scores; history notes and the Mays et al. 27(5) referenceالقسم D.1: الشكل D.1، والمعادلات من D.1 إلى D.5، وسبب حذف P(x)، ونموذج القناة والاحتمال المسبق؛ والشكل D.5 لدرجات acress؛ والملاحظات التاريخية ومرجع Mays et al. بالمجلد 27(5)(opens in a new tab)(يفتح في تبويب جديد)
- Spelling Correction and the Noisy Channel (lecture slides)DocsDan Jurafsky, Stanford UniversityThe source deck for slides 9 to 12, including the 23(5) citation corrected aboveالعرض الأصلي للشرائح من 9 إلى 12، بما فيه الاستشهاد بالمجلد 23(5) الذي صحّحناه أعلاه(opens in a new tab)(يفتح في تبويب جديد)
- A Spelling Correction Program Based on a Noisy Channel ModelPaperKernighan, Church and Gale, COLING 1990The AT&T Bell Labs proposal of noisy channel spelling correctionاقتراح AT&T Bell Labs لتصحيح الإملاء بنموذج القناة المشوّشة(opens in a new tab)(يفتح في تبويب جديد)
- The Mathematics of Statistical Machine Translation: Parameter EstimationPaperBrown, Della Pietra, Della Pietra and Mercer, Computational Linguistics 19(2), 1993The Fundamental Equation of Machine Translation, the dropped denominator, and why Pr(e) and Pr(f|e) are estimated instead of Pr(e|f)المعادلة الأساسية للترجمة الآلية، والمقام المحذوف، ولماذا يُقدَّر Pr(e) وPr(f|e) بدلًا من Pr(e|f)(opens in a new tab)(يفتح في تبويب جديد)