ICS 582Lecture 02المحاضرة 02Part 10الجزء 10
Minimum edit distance: alignments and searchمسافة التحرير الدنيا: المحاذاة والبحث
Measuring how far apart two strings are with insertions, deletions and substitutions, seeing the answer as an alignment, and recognizing the problem as a shortest path that dynamic programming solves.قياس بُعد سلسلتين نصيتين عن بعضهما بالإدراج والحذف والاستبدال، والنظر إلى الإجابة كمحاذاة (alignment)، والتعرف على المشكلة كأقصر مسار تحله البرمجة الديناميكية.
- Conceptsالمفاهيم
- 4
- Slidesالشرائح
- 79-86
- Readingمدة القراءة
- 24 min24 دقيقة
Why this part mattersلماذا يهمّ هذا الجزء
Edit distance is the first dynamic programming algorithm in this course, and its shape returns in the Viterbi decoder and in CKY parsing. It is also the metric under word error rate, so any speech or Arabic ASR work in the research project will report it. It is a reliable exam item: define it, write the recurrence, fill a table, recover an alignment.
This part builds the idea in four moves. First the definition and why anyone needs it. Then the alignment view, which turns a distance into columns you can read and add up, and which exposes a trap: the slides define substitution at cost 1, but the worked table in part 11 (taken from SLP3) charges 2, and the same pair of words comes out as 5 or 8 depending on that choice. Then the search view, which shows why brute force fails and what dynamic programming remembers. Finally the recurrence itself and the cost function it plugs in.
مسافة التحرير (edit distance) هي أول خوارزمية برمجة ديناميكية (dynamic programming) في هذا المقرر، وشكلها يتكرر لاحقًا في مفكّك Viterbi وفي تحليل CKY. وهي أيضًا المقياس الذي يقوم عليه معدل خطأ الكلمات (word error rate)، لذلك فأي عمل على الكلام أو على التعرّف الآلي على الكلام العربي (Arabic ASR) في مشروع البحث سيذكره. وهي سؤال امتحان مضمون: عرّفها، اكتب العلاقة التكرارية، املأ جدولًا، استرجع محاذاة.
يبني هذا الجزء الفكرة في أربع خطوات. أولًا التعريف ولماذا يحتاجه أحد أصلًا. ثم منظور المحاذاة، الذي يحوّل المسافة إلى أعمدة يمكنك قراءتها وجمعها، ويكشف فخًّا: الشرائح تعرّف الاستبدال بتكلفة 1، لكن الجدول المحلول في الجزء 11 (المأخوذ من SLP3) يحتسبه بتكلفة 2، فيخرج الزوج نفسه من الكلمات بقيمة 5 أو 8 بحسب هذا الاختيار. ثم منظور البحث، الذي يبيّن لماذا تفشل القوة الغاشمة (brute force) وما الذي تتذكره البرمجة الديناميكية. وأخيرًا العلاقة التكرارية نفسها ودالة التكلفة التي تُوضع فيها.
By the end you canفي نهاية هذا الجزء ستستطيع
- Define minimum edit distance, name the three operations, and say what each costs under unit costs.تعرّف مسافة التحرير الدنيا (minimum edit distance)، وتسمّي العمليات الثلاث، وتذكر تكلفة كل منها في التكاليف الوحدوية (unit costs).
- Read and cost an alignment under unit costs and under substitution cost 2, and declare which convention you use.تقرأ المحاذاة (alignment) وتحسب تكلفتها في التكاليف الوحدوية وعندما تكون تكلفة الاستبدال 2، وتصرّح بالاصطلاح الذي تستخدمه.
- Explain why naive search over edit sequences is exponential and why the grid of prefix pairs is O(mn).تشرح لماذا يكون البحث الساذج في متتاليات التحرير أُسّيًا، ولماذا تكون شبكة أزواج البادئات (prefix pairs) من رتبة O(mn).
- Write the initialization and the recurrence for D[i,j] and justify D[i,0] = i.تكتب التهيئة (initialization) والعلاقة التكرارية (recurrence) لـ D[i,j]، وتبرّر لماذا D[i,0] = i.
- Compute a word error rate from an alignment and describe weighted substitution and transposition extensions.تحسب معدل خطأ الكلمات (WER) من محاذاة، وتصف امتدادات الاستبدال الموزون والتبديل (transposition).
A speech recognizer hears "turn on the kitchen light" and writes "turn on a kitchen light please". A spell checker sees "acress". An OCR engine reads the two letters "rn" as an "m". In each case there is a string we have and a string we want, and the question is the same: how much editing separates them?
يسمع نظام التعرّف على الكلام «turn on the kitchen light» فيكتب «turn on a kitchen light please». ويرى مدقق الإملاء «acress». ويقرأ محرك OCR الحرفين «rn» على أنهما «m». في كل حالة لدينا سلسلة نملكها وسلسلة نريدها، والسؤال واحد: كم من التحرير يفصل بينهما؟
The answer is the Minimum edit distance: the minimum total cost of the editing operations that turn a source string into a target string. Three operations are allowed. An insertion adds one symbol, a deletion removes one, and a substitution replaces one with another. Each operation has a cost, most often 1, and the distance is the cheapest way of getting from source to target, not the first way you happen to find. With every operation at cost 1 (and a substitution of a letter by itself at cost 0) this quantity is the Levenshtein distance, after the 1966 paper that introduced it for error correcting codes. Nothing in the definition says the symbols must be letters. Take words as the symbols and the same definition measures how far a recognized sentence is from its transcript, which is exactly how speech recognition uses it.
الإجابة هي minimum edit distance (مسافة التحرير الدنيا): أقل تكلفة إجمالية لعمليات التحرير التي تحوّل سلسلة مصدر (source) إلى سلسلة هدف (target). يُسمح بثلاث عمليات. الإدراج (insertion) يضيف رمزًا واحدًا، والحذف (deletion) يزيل رمزًا واحدًا، والاستبدال (substitution) يضع رمزًا مكان آخر. لكل عملية تكلفة، غالبًا 1، والمسافة هي أرخص طريقة للوصول من المصدر إلى الهدف، لا أول طريقة تصادفها. وعندما تكون تكلفة كل عملية 1 (وتكلفة استبدال الحرف بنفسه 0) تُسمّى هذه الكمية Levenshtein distance، نسبةً إلى بحث عام 1966 الذي قدّمها لرموز تصحيح الأخطاء. ولا يوجد في التعريف ما يشترط أن تكون الرموز حروفًا. اجعل الكلمات هي الرموز، فيقيس التعريف نفسه مدى بُعد جملة متعرَّف عليها عن نصها المرجعي، وهذا بالضبط ما يفعله التعرّف على الكلام.
Where edit distance is used, and the mechanism in each caseأين تُستخدم مسافة التحرير، وآلية عملها في كل حالة
- Spelling correctionتصحيح الإملاء
- Generate candidates that differ from the typo by a single insertion, deletion, substitution or reversal, then rank them: for acress, the candidates are actress, cress, caress, access, across and acres.ولّد المرشحين الذين يختلفون عن الخطأ المطبعي بإدراج واحد أو حذف واحد أو استبدال واحد أو عكس ترتيب حرفين، ثم رتّبهم: لكلمة acress المرشحون هم actress وcress وcaress وaccess وacross وacres.
- OCR post-processingالمعالجة اللاحقة لمخرجات OCR
- Map a recognized string with a misread rn or m to the nearest entry of a lexicon.اربط السلسلة المتعرَّف عليها، التي قُرئ فيها rn أو m خطأً، بأقرب مدخل في المعجم (lexicon).
- Speech recognition (WER)التعرّف على الكلام (WER)
- Align the recognized word sequence to the reference transcript and count the word-level insertions, substitutions and deletions.حاذِ متتالية الكلمات المتعرَّف عليها مع النص المرجعي، واحسب الإدراجات والاستبدالات والحذوفات على مستوى الكلمات.
- Approximate matchingالمطابقة التقريبية
- Search a text for a pattern while allowing a bounded number of edits, for example in DNA or in fuzzy search boxes.ابحث في نص عن نمط مع السماح بعدد محدود من التعديلات، كما في DNA أو في مربعات البحث التقريبي (fuzzy search).
- Alignmentالمحاذاة
- Make explicit which characters correspond, which is the view the next concept builds on.اجعل تقابل الحروف صريحًا، وهو المنظور الذي يبني عليه المفهوم التالي.
The spelling application is older than most of NLP. Damerau found in 1964 that a single wrong, missing, extra or transposed letter accounts for about 80 percent of spelling errors, which is why candidate generation by a single transformation works so well: Kernighan, Church and Gale's spelling corrector lists exactly the six single-transformation candidates for "acress" shown in the table, one of them (caress) reached by reversing the first two letters rather than by a Levenshtein substitution, and then picks among them with a probabilistic model. Approximate matching generalizes the search direction: instead of comparing two whole strings, you look for places in a long text that a pattern would match after at most k edits.
تطبيق الإملاء أقدم من معظم NLP. وجد Damerau عام 1964 أن حرفًا واحدًا خاطئًا أو ناقصًا أو زائدًا أو مبدَّل الموضع يفسّر نحو 80 بالمئة من أخطاء الإملاء، ولهذا ينجح توليد المرشحين بتحويل واحد نجاحًا كبيرًا: مصحح الإملاء الذي بناه Kernighan وChurch وGale يسرد بالضبط المرشحين الستة ذوي التحويل الواحد لكلمة «acress» المبيّنين في الجدول، وأحدهم (caress) يُوصل إليه بعكس ترتيب الحرفين الأولين لا باستبدال من نوع Levenshtein، ثم يختار بينهم بنموذج احتمالي. أما المطابقة التقريبية (approximate matching) فتعمّم اتجاه البحث: بدلًا من مقارنة سلسلتين كاملتين، تبحث عن مواضع في نص طويل يطابقها النمط بعد k تعديلات على الأكثر.
Word error rate, computedحساب معدل خطأ الكلمات
The Word error rate (WER) is edit distance applied to words. Align the recognizer's hypothesis to the human reference at the word level, count the insertions, substitutions and deletions on that alignment, and divide by the number of words in the reference. The denominator is the reference, never the hypothesis, and because insertions are counted the rate can exceed 100 percent.
Word error rate (معدل خطأ الكلمات) هو مسافة التحرير مطبّقة على الكلمات. حاذِ فرضية نظام التعرّف (hypothesis) مع المرجع البشري (reference) على مستوى الكلمات، واحسب الإدراجات والاستبدالات والحذوفات في تلك alignment، ثم اقسم على عدد كلمات المرجع. المقام هو المرجع وليس الفرضية أبدًا، ولأن الإدراجات تُحسب فقد يتجاوز المعدل 100 بالمئة.
Worked exampleمثال محلول
WER for the kitchen lightحساب WER لجملة ضوء المطبخ
Reference and hypothesisالمرجع والفرضية
Reference: "turn on the kitchen light" (5 words). Hypothesis: "turn on a kitchen light please" (6 words).المرجع: «turn on the kitchen light» (5 كلمات). الفرضية: «turn on a kitchen light please» (6 كلمات).Align at the word levelالمحاذاة على مستوى الكلمات
turn and on match, the becomes a (one substitution), kitchen and light match, please has nothing above it (one insertion).turn وon متطابقتان، وthe تصبح a (استبدال واحد)، وkitchen وlight متطابقتان، وplease لا يقابلها شيء فوقها (إدراج واحد).Count and divideالعدّ والقسمة
I + S + D = 1 + 1 + 0 = 2, over 5 reference words.I + S + D = 1 + 1 + 0 = 2، مقسومًا على 5 كلمات في المرجع.Resultالنتيجة
WER = 2 / 5 = 40 percent. A 2-word reference recognized as 5 words with three insertions would give 3 / 2 = 150 percent, which is legal and common on noisy audio.WER = 2 / 5 = 40 percent. ومرجع من كلمتين (2) يُتعرَّف عليه على أنه 5 كلمات بثلاثة إدراجات يعطي 3 / 2 = 150 percent، وهذا مقبول وشائع مع الصوت المشوَّش.
SLP3's own CallHome example has 6 substitutions, 3 insertions and 1 deletion over 13 reference words, a WER of 76.9 percent. The standard scorer is NIST's sclite in the SCTK toolkit, which does the alignment and the arithmetic for you but reports exactly these counts.
مثال CallHome في SLP3 نفسه فيه 6 استبدالات و3 إدراجات وحذف واحد (1) على 13 كلمة مرجعية، أي WER قدره 76.9 بالمئة. والمقيّم القياسي هو أداة sclite من NIST ضمن حزمة SCTK، التي تنفّذ المحاذاة والحساب نيابةً عنك لكنها تُبلغ عن هذه الأعداد نفسها بالضبط.
Recall
Define minimum edit distance and name the three operations. What is it called when every operation costs one?عرّف مسافة التحرير الدنيا وسمِّ العمليات الثلاث. ماذا تُسمّى عندما تكون تكلفة كل عملية واحدًا؟
Recall
How does WER use edit distance, and can it exceed 100 percent?كيف يستخدم WER مسافة التحرير، وهل يمكن أن يتجاوز 100 بالمئة؟
Quick checkاختبار سريع
A 10-word reference is recognized with 2 substitutions, 1 deletion and 2 insertions. What is the WER?مرجع من 10 كلمات تعرّف عليه النظام مع استبدالين وحذف واحد وإدراجين. ما قيمة WER؟
Lay the two words on top of each other as on slide 82, with a star for a gap, and read the ten columns from left to right: I over a star, N over E, T over X, E over E, a star over C, N over U, and then T I O N over T I O N. The row underneath, d s s _ i s, names the columns that cost something: delete I, substitute N by E, substitute T by X, insert C, substitute N by U. Five operations, and five is the minimum edit distance.
ضع الكلمتين إحداهما فوق الأخرى كما في الشريحة 82، مع نجمة للفجوة (gap)، واقرأ الأعمدة العشرة من اليسار إلى اليمين: I فوق نجمة، N فوق E، T فوق X، E فوق E، نجمة فوق C، N فوق U، ثم T I O N فوق T I O N. والصف الذي تحتها، d s s _ i s، يسمّي الأعمدة التي لها تكلفة: احذف I، استبدل N بـE، استبدل T بـX، أدرج C، استبدل N بـU. خمس عمليات، والخمسة هي مسافة التحرير الدنيا.
What you just read is an Alignment: a correspondence between the two strings that says, for every symbol, what it lines up with. A column with the same letter top and bottom is a match and costs nothing. A column with two different letters is a substitution. A letter over a gap is a deletion (the source letter is consumed without producing anything), and a gap over a letter is an insertion. The cost of an alignment is the sum of its column costs, and the minimum edit distance is simply the cost of the cheapest alignment. The practical half of the story is that the dynamic programming table does not just give the number, it stores a Backpointer in each cell, and following those pointers back from the last cell recovers one cheapest alignment. Part 11 does that recovery by hand.
ما قرأته للتو هو alignment (محاذاة): تقابل بين السلسلتين يحدد لكل رمز ما يقابله. العمود الذي فيه الحرف نفسه أعلى وأسفل هو تطابق (match) ولا يكلّف شيئًا. والعمود الذي فيه حرفان مختلفان هو استبدال. والحرف فوق فجوة هو حذف (يُستهلك حرف المصدر دون أن ينتج شيئًا)، والفجوة فوق حرف هي إدراج. تكلفة المحاذاة هي مجموع تكاليف أعمدتها، ومسافة التحرير الدنيا ببساطة هي تكلفة أرخص محاذاة. والنصف العملي من القصة أن جدول dynamic programming لا يعطي الرقم فقط، بل يخزّن backpointer (مؤشرًا خلفيًا) في كل خلية، وتتبّع هذه المؤشرات رجوعًا من الخلية الأخيرة يسترجع إحدى المحاذاات الأرخص. الجزء 11 يقوم بهذا الاسترجاع يدويًا.
Two cost conventions, and the same words come out as 5 or 8اصطلاحان للتكلفة، والكلمات نفسها تخرج بـ5 أو 8
Here is the trap this lecture sets, and the reason this section exists. Slides 85 and 86 define the Substitution cost as 1 for two different letters. The filled table you will meet in part 11 (slides 89 and 91) is copied from SLP3, and SLP3 fills it with a substitution cost of 2. Levenshtein proposed both: in his second version insertions and deletions cost 1 and substitutions are simply not allowed, and since any substitution can be written as a deletion followed by an insertion, that is the same as allowing it at cost 2. Both are legitimate cost functions. They give different numbers, and they can disagree about which alignment is best.
هذا هو الفخ الذي تنصبه هذه المحاضرة، وهو سبب وجود هذا القسم. الشريحتان 85 و86 تعرّفان substitution cost (تكلفة الاستبدال) بأنها 1 لحرفين مختلفين. أما الجدول المملوء الذي ستقابله في الجزء 11 (الشريحتان 89 و91) فمنسوخ من SLP3، وSLP3 يملؤه بتكلفة استبدال 2. اقترح Levenshtein الاثنين معًا: في نسخته الثانية يكلّف الإدراج والحذف 1 ولا يُسمح بالاستبدال إطلاقًا، وبما أن أي استبدال يمكن كتابته كحذف يليه إدراج، فهذا يكافئ السماح به بتكلفة 2. كلتاهما دالة تكلفة مشروعة. تعطيان أرقامًا مختلفة، وقد تختلفان أيضًا حول أي محاذاة هي الأفضل.
| Operationالعملية | Unit costs (slides 85, 86)التكاليف الوحدوية (الشريحتان 85 و86) | SLP3 table costs (substitution 2)تكاليف جدول SLP3 (الاستبدال 2) |
|---|---|---|
| Match (same letter)تطابق (الحرف نفسه) | 00 | 00 |
| Insertionإدراج | 11 | 11 |
| Deletionحذف | 11 | 11 |
| Substitution (different letters)استبدال (حرفان مختلفان) | 11 | 22 |
| Columnالعمود | Operationالعملية | Unit costsالتكاليف الوحدوية | Substitution 2الاستبدال 2 |
|---|---|---|---|
| I over *I فوق * | deleteحذف | 11 | 11 |
| N over EN فوق E | substituteاستبدال | 11 | 22 |
| T over XT فوق X | substituteاستبدال | 11 | 22 |
| E over EE فوق E | matchتطابق | 00 | 00 |
| * over C* فوق C | insertإدراج | 11 | 11 |
| N over UN فوق U | substituteاستبدال | 11 | 22 |
| T I O N over T I O NT I O N فوق T I O N | four matchesأربعة تطابقات | 00 | 00 |
| Totalالمجموع | 55 | 88 |
Read the totals again: 1 + 1 + 1 + 0 + 1 + 1 = 5 under unit costs and 1 + 2 + 2 + 0 + 1 + 2 = 8 with substitutions at 2. Both describe the same alignment. If an exam asks for the distance from intention to execution and you answer 8 without saying why, the grader who has the slide 85 recurrence in mind will mark it wrong, and the reverse is also true.
اقرأ المجموعين مرة أخرى: 1 + 1 + 1 + 0 + 1 + 1 = 5 في التكاليف الوحدوية و1 + 2 + 2 + 0 + 1 + 2 = 8 عندما يكلّف الاستبدال 2. كلاهما يصف المحاذاة نفسها. إذا سأل الامتحان عن المسافة من intention إلى execution وأجبت 8 دون أن تقول لماذا، فالمصحح الذي يضع في ذهنه علاقة الشريحة 85 سيعتبرها خطأ، والعكس صحيح أيضًا.
Try it: label the columns yourselfجرّب بنفسك: سمِّ الأعمدة
The editor below shows three alignments of intention and execution, with the four trailing matches already labeled. Label every remaining column, watch the two totals update, and then compare the presets. The third one pairs the letters position by position with no gaps at all: five substitutions. Under unit costs it ties the slide alignment at 5. With substitutions at 2 it costs 10 and loses to 8. The cost function does not only change the total; it changes which alignments are optimal.
يعرض المحرر أدناه ثلاث محاذاات لـintention وexecution، مع تسمية التطابقات الأربعة الأخيرة مسبقًا. سمِّ كل عمود متبقٍّ، وراقب المجموعين وهما يتحدّثان، ثم قارن المحاذاات الجاهزة. الثالثة تقرن الحروف موضعًا بموضع دون أي فجوات: خمسة استبدالات. في التكاليف الوحدوية تتعادل مع محاذاة الشريحة عند 5. وعندما يكلّف الاستبدال 2 تكلّف 10 وتخسر أمام 8. دالة التكلفة لا تغيّر المجموع فقط؛ بل تغيّر أيضًا أي المحاذاات هي المثلى.
Read each column of the alignment (source letter on top, target letter below, * for a gap) and label it match, substitution, insertion or deletion. The last 4 columns (T I O N) come pre-labeled as matches. The totals update from your labels under both cost conventions. Press check to grade the columns.اقرأ كل عمود في المحاذاة (حرف المصدر في الأعلى، وحرف الهدف في الأسفل، و* للفراغ) وسمِّه: تطابق (match) أو استبدال (sub) أو إدراج (ins) أو حذف (del). الأعمدة الـ4 الأخيرة (T I O N) مسمّاة مسبقًا على أنها تطابقات. تتحدّث المجاميع من تسمياتك وفق اصطلاحي الكلفة كليهما. اضغط تحقّق لتقييم الأعمدة.
| Alignmentالمحاذاة | Operationsالعمليات | Unit costsالتكاليف الوحدوية | Substitution 2الاستبدال 2 |
|---|---|---|---|
| Slide 82: d s s _ i sالشريحة 82: d s s _ i s | 1 del, 3 sub, 1 insحذف واحد، 3 استبدالات، إدراج واحد | 55 | 88 |
| SLP3 figure 2.19: delete i, n to e, t to x, insert u, n to cالشكل 2.19 في SLP3: احذف i، n إلى e، t إلى x، أدرج u، n إلى c | 1 del, 3 sub, 1 insحذف واحد، 3 استبدالات، إدراج واحد | 55 | 88 |
| Position by position, no gapsموضعًا بموضع، دون فجوات | 5 sub5 استبدالات | 55 | 1010 |
Worked exampleمثال محلول
A second pair: kitten to sittingزوج ثانٍ: kitten إلى sitting
Write the alignmentاكتب المحاذاة
k over s, i over i, t over t, t over t, e over i, n over n, and a gap over g.k فوق s، i فوق i، t فوق t، t فوق t، e فوق i، n فوق n، وفجوة فوق g.Name the columnsسمِّ الأعمدة
substitution, match, match, match, substitution, match, insertion.استبدال، تطابق، تطابق، تطابق، استبدال، تطابق، إدراج.Cost it both waysاحسب التكلفة بالطريقتين
Unit costs: 1 + 0 + 0 + 0 + 1 + 0 + 1 = 3. Substitution at 2: 2 + 0 + 0 + 0 + 2 + 0 + 1 = 5.التكاليف الوحدوية: 1 + 0 + 0 + 0 + 1 + 0 + 1 = 3. الاستبدال بتكلفة 2: 2 + 0 + 0 + 0 + 2 + 0 + 1 = 5.Resultالنتيجة
Distance 3 under unit costs, 5 under substitution cost 2. The alignment is optimal under both, because no cheaper one exists for either function.المسافة 3 في التكاليف الوحدوية، و5 عندما تكون تكلفة الاستبدال 2. هذه المحاذاة مثلى في الحالتين، لأنه لا توجد محاذاة أرخص منها في أي من الدالتين.
Recall
Cost the slide 82 alignment d s s _ i s under unit costs and under substitution cost 2.احسب تكلفة محاذاة الشريحة 82 (d s s _ i s) في التكاليف الوحدوية وعندما تكون تكلفة الاستبدال 2.
Quick checkاختبار سريع
Under unit costs, what is the minimum edit distance from intention to execution?في التكاليف الوحدوية، ما مسافة التحرير الدنيا من intention إلى execution؟
From an exploding search tree to a grid of prefix pairsمن شجرة بحث متفجرة إلى شبكة من أزواج البادئات
The obvious algorithm is search. Start at intention and try one edit: delete a letter and you get ntention, insert a letter and you get intecntion, substitute a letter and you get inxention. Those are three of the children. Count all of them for a 26-letter alphabet: 9 possible deletions, 26 × 10 = 260 insertions and 25 × 9 = 225 substitutions, which is 494 children for one step. The rule of thumb 2|Σ|L used below is 2 × 26 × 9 = 468 here, the same order as the exact 494 and convenient for estimating the growth. A blind search that needs five steps to reach execution touches on the order of 494^5, about 3 × 10^13 strings. SLP3 puts it plainly: the space of all possible edits is enormous, so we cannot search naively.
الخوارزمية البديهية هي البحث. ابدأ من intention وجرّب تعديلًا واحدًا: احذف حرفًا فتحصل على ntention، أدرج حرفًا فتحصل على intecntion، استبدل حرفًا فتحصل على inxention. هذه ثلاثة من الأبناء. عُدّها كلها لأبجدية من 26 حرفًا: 9 حذوفات ممكنة، و26 × 10 = 260 إدراجًا، و25 × 9 = 225 استبدالًا، أي 494 ابنًا لخطوة واحدة. والقاعدة التقريبية 2|Σ|L المستخدمة أدناه تساوي هنا 2 × 26 × 9 = 468، وهي من رتبة القيمة الدقيقة 494 نفسها ومريحة لتقدير النمو. والبحث الأعمى الذي يحتاج خمس خطوات للوصول إلى execution يلمس ما رتبته 494^5، أي نحو 3 × 10^13 سلسلة. ويقولها SLP3 صراحةً: فضاء كل التعديلات الممكنة هائل، فلا يمكننا البحث فيه بسذاجة.
The visual shows the observation that rescues the problem. Delete the i of intention and then substitute t by x and you reach nxention. Substitute t by x first and then delete the i and you reach nxention again. Two paths, one state, and once you know the cheapest way to reach a state there is no reason to explore any other route into it. SLP3 states the idea directly: many distinct edit paths end up in the same string, so rather than recomputing all those paths we can remember the shortest path to a state each time we see it. Remembering subproblem answers and combining them is Dynamic programming, Bellman's table-driven method from 1957.
يعرض الشكل الملاحظة التي تنقذ المسألة. احذف i من intention ثم استبدل t بـx فتصل إلى nxention. استبدل t بـx أولًا ثم احذف i فتصل إلى nxention مرة أخرى. مساران وحالة واحدة، وبمجرد أن تعرف أرخص طريقة للوصول إلى حالة فلا داعي لاستكشاف أي طريق آخر إليها. يقول SLP3 الفكرة مباشرة: كثير من مسارات التعديل المختلفة تنتهي إلى السلسلة نفسها، فبدلًا من إعادة حساب كل تلك المسارات يمكننا أن نتذكر أقصر مسار إلى الحالة كلما رأيناها. وتذكّر إجابات المسائل الفرعية والجمع بينها هو dynamic programming (البرمجة الديناميكية)، طريقة Bellman القائمة على الجداول من عام 1957.
Why only prefix pairs matterلماذا لا يهمّ إلا أزواج البادئات
Remembering strings is still too many states. The step that makes the table small is to notice which states can matter at all. Suppose exention lies on an optimal path from intention to execution. Then the part of the path from intention to exention must itself be optimal, because if a shorter way to exention existed we could splice it in and shorten the whole path, a contradiction. This is the Optimal substructure argument in SLP3, and it means the only thing worth remembering about a partial solution is how much of the source it has consumed and how much of the target it has produced: the pair (i, j). For two 9-letter words there are only (m + 1)(n + 1) = 10 × 10 = 100 such pairs. Put as a picture: edits are moves in a grid from (0, 0) to (m, n), each move is one operation, and dynamic programming finds the best path efficiently.
تذكّر السلاسل ما زال يعني حالات أكثر من اللازم. الخطوة التي تجعل الجدول صغيرًا هي أن نلاحظ أي الحالات يمكن أن تهمّ أصلًا. افترض أن exention تقع على مسار أمثل من intention إلى execution. عندئذ يجب أن يكون جزء المسار من intention إلى exention أمثل هو نفسه، لأنه لو وُجد طريق أقصر إلى exention لأمكننا وصله مكانه وتقصير المسار كله، وهذا تناقض. هذه هي حجة optimal substructure (البنية الجزئية المثلى) في SLP3، وهي تعني أن الشيء الوحيد الذي يستحق التذكر عن حل جزئي هو كم استهلك من المصدر وكم أنتج من الهدف: الزوج (i, j). ولكلمتين من 9 أحرف لا يوجد إلا (m + 1)(n + 1) = 10 × 10 = 100 زوج من هذا النوع. وبالصورة: التعديلات حركات في شبكة من (0, 0) إلى (m, n)، كل حركة عملية واحدة، والبرمجة الديناميكية تجد أفضل مسار بكفاءة.
| Moveالحركة | What it doesما تفعله | Operationالعملية | Recurrence termحدّ العلاقة التكرارية |
|---|---|---|---|
| Down, (i - 1, j) to (i, j)نزول، من (i - 1, j) إلى (i, j) | Consume a source letter, produce nothingيستهلك حرفًا من المصدر ولا ينتج شيئًا | Deletionحذف | D[i - 1, j] + delD[i - 1, j] + del |
| Right, (i, j - 1) to (i, j)يمين، من (i, j - 1) إلى (i, j) | Produce a target letter from nothingينتج حرفًا من الهدف من لا شيء | Insertionإدراج | D[i, j - 1] + insD[i, j - 1] + ins |
| Diagonal, (i - 1, j - 1) to (i, j)قُطري، من (i - 1, j - 1) إلى (i, j) | Pair a source letter with a target letterيقرن حرفًا من المصدر بحرف من الهدف | Substitution or matchاستبدال أو تطابق | D[i - 1, j - 1] + sub(x_i, y_j)D[i - 1, j - 1] + sub(x_i, y_j) |
A path from the top-left corner to the bottom-right corner that uses only these three moves is an alignment: each step is one column. Reading the slide 82 alignment as moves gives down, diagonal, diagonal, diagonal, right, then five diagonals, which is the staircase in the figure. Wagner and Fischer showed in 1974 that filling the grid solves the problem in time proportional to the product of the two lengths, O(mn) time and, with backpointers stored, O(mn) space. Each cell is filled once with three comparisons.
المسار من الزاوية العليا اليسرى إلى الزاوية السفلى اليمنى الذي لا يستخدم إلا هذه الحركات الثلاث هو alignment (محاذاة): كل خطوة عمود واحد. وقراءة محاذاة الشريحة 82 كحركات تعطي: نزول، قُطر، قُطر، قُطر، يمين، ثم خمس حركات قُطرية، وهذا هو الدرج في الشكل. بيّن Wagner وFischer عام 1974 أن ملء الشبكة يحل المسألة في زمن يتناسب مع حاصل ضرب الطولين، أي زمن O(mn)، ومع تخزين backpointers (المؤشرات الخلفية) مساحة O(mn). كل خلية تُملأ مرة واحدة بثلاث مقارنات.
Recall
Why is the search tree over edit sequences exponential while the grid is polynomial?لماذا تكون شجرة البحث على متتاليات التعديل أُسّية بينما تكون الشبكة كثيرة حدود؟
Quick checkاختبار سريع
In the DP grid with source letters down the rows, which move is an insertion?في شبكة البرمجة الديناميكية التي تكون فيها حروف المصدر على الصفوف نزولًا، أي حركة تمثل إدراجًا؟
Quick checkاختبار سريع
Why does dynamic programming beat naive search over edit sequences?لماذا تتفوق البرمجة الديناميكية على البحث الساذج في متتاليات التعديل؟
Three small questions give you the whole initialization. What is the distance from int to the empty string? You must delete i, n and t, so 3. From the empty string to ex? Insert e and x, so 2. From empty to empty? Nothing to do, 0. Write those as D[3, 0] = 3, D[0, 2] = 2 and D[0, 0] = 0 and you have the first row and column of every table you will ever fill.
ثلاثة أسئلة صغيرة تعطيك التهيئة كلها. ما المسافة من int إلى السلسلة الفارغة؟ عليك أن تحذف i وn وt، إذن 3. ومن السلسلة الفارغة إلى ex؟ أدرج e وx، إذن 2. ومن الفارغة إلى الفارغة؟ لا شيء يُفعل، 0. اكتبها على صورة D[3, 0] = 3 وD[0, 2] = 2 وD[0, 0] = 0 فيكون لديك الصف الأول والعمود الأول لكل جدول ستملؤه في حياتك.
Slide 85 sets the notation. The source x has length m, the target y has length n, and D[i, j] is the minimum edit distance between the prefix x[1..i] and the prefix y[1..j]. The answer to the whole problem is the last cell, D[m, n]. The Edit distance recurrence says how to fill every other cell from three neighbors.
الشريحة 85 تحدد الرموز. المصدر x طوله m، والهدف y طوله n، وD[i, j] هي minimum edit distance (مسافة التحرير الدنيا) بين البادئة x[1..i] والبادئة y[1..j]. وإجابة المسألة كلها هي الخلية الأخيرة، D[m, n]. وedit distance recurrence (العلاقة التكرارية لمسافة التحرير) تحدد كيف تُملأ كل خلية أخرى من ثلاثة جيران.
Each line is one possible last column of an optimal alignment of the two prefixes. Either the last column is x_i over a gap, in which case the rest is an optimal alignment of x[1..i-1] with y[1..j] and we pay a deletion; or it is a gap over y_j, the rest aligns x[1..i] with y[1..j-1] and we pay an insertion; or it is x_i over y_j, the rest aligns the two shorter prefixes and we pay the substitution cost, which is zero when the letters agree. There is no fourth shape a column can take, so the minimum over these three is exact. That is the optimal substructure of the previous concept written as an equation.
كل سطر يمثل عمودًا أخيرًا ممكنًا لـalignment (محاذاة) مثلى للبادئتين. إما أن يكون العمود الأخير x_i فوق فجوة، وعندها يكون الباقي محاذاة مثلى لـx[1..i-1] مع y[1..j] وندفع تكلفة حذف؛ أو يكون فجوة فوق y_j، فيحاذي الباقي x[1..i] مع y[1..j-1] وندفع تكلفة إدراج؛ أو يكون x_i فوق y_j، فيحاذي الباقي البادئتين الأقصر وندفع تكلفة الاستبدال، التي تساوي صفرًا عندما يتطابق الحرفان. لا يوجد شكل رابع يمكن أن يتخذه العمود، لذلك فالحد الأدنى على هذه الثلاثة دقيق تمامًا. وهذه هي البنية الجزئية المثلى من المفهوم السابق مكتوبة كمعادلة.
Now the exam favorite: why is D[i, 0] = i? The target prefix is empty, so every one of the i source letters has to disappear, and the only operation that removes a source letter is a deletion. No insertion can help, since it would produce a target letter where none is wanted, and no substitution can help, since it leaves a letter in place. At one unit per deletion the cost is exactly i. The mirror argument gives D[0, j] = j. In the general form of SLP3's pseudocode the border is built incrementally, D[i, 0] = D[i-1, 0] + del(x_i), which reduces to i when deletions cost one.
والآن السؤال المفضل في الامتحانات: لماذا D[i, 0] = i؟ البادئة الهدف فارغة، لذلك يجب أن يختفي كل حرف من حروف المصدر الـi، والعملية الوحيدة التي تزيل حرفًا من المصدر هي الحذف. لا يمكن لأي إدراج أن يساعد، لأنه سينتج حرفًا في الهدف حيث لا يُراد أي حرف، ولا يمكن لأي استبدال أن يساعد، لأنه يُبقي حرفًا في مكانه. وبوحدة واحدة لكل حذف تكون التكلفة i بالضبط. والحجة المعاكسة تعطي D[0, j] = j. وفي الصيغة العامة لشيفرة SLP3 الزائفة (pseudocode) يُبنى الحد تدريجيًا، D[i, 0] = D[i-1, 0] + del(x_i)، وهذا يؤول إلى i عندما تكون تكلفة الحذف واحدًا.
A table you can fill in one minuteجدول يمكنك ملؤه في دقيقة واحدة
Before the 10 × 10 table of part 11, fill a tiny one under unit costs: cat to cats. The first row and column are the initialization. Every other cell is the minimum of the cell above plus one, the cell to the left plus one, and the diagonal cell plus zero or one.
قبل جدول 10 × 10 في الجزء 11، املأ جدولًا صغيرًا في التكاليف الوحدوية: cat إلى cats. الصف الأول والعمود الأول هما التهيئة. وكل خلية أخرى هي أصغر قيمة بين الخلية التي فوقها زائد واحد، والخلية التي على يسارها زائد واحد، والخلية القُطرية زائد صفر أو واحد.
| εε | cc | aa | tt | ss | |
|---|---|---|---|---|---|
| εε | 00 | 11 | 22 | 33 | 44 |
| cc | 11 | 00 | 11 | 22 | 33 |
| aa | 22 | 11 | 00 | 11 | 22 |
| tt | 33 | 22 | 11 | 00 | 11 |
Worked exampleمثال محلول
Two cells in fullخليتان بالتفصيل الكامل
D[1, 1], c against cD[1, 1]، الحرف c مقابل c
Above: D[0, 1] + 1 = 2. Left: D[1, 0] + 1 = 2. Diagonal: D[0, 0] + sub(c, c) = 0 + 0 = 0. Minimum 0.من الأعلى: D[0, 1] + 1 = 2. من اليسار: D[1, 0] + 1 = 2. القُطر: D[0, 0] + sub(c, c) = 0 + 0 = 0. الأصغر 0.D[3, 4], cat against catsD[3, 4]، cat مقابل cats
Above: D[2, 4] + 1 = 3. Left: D[3, 3] + 1 = 1. Diagonal: D[2, 3] + sub(t, s) = 1 + 1 = 2. Minimum 1, from the left, which is an insertion of s.من الأعلى: D[2, 4] + 1 = 3. من اليسار: D[3, 3] + 1 = 1. القُطر: D[2, 3] + sub(t, s) = 1 + 1 = 2. الأصغر 1، من اليسار، أي إدراج s.Resultالنتيجة
D[3, 4] = 1: one insertion turns cat into cats, and the backpointer of the last cell already says so.D[3, 4] = 1: إدراج واحد يحوّل cat إلى cats، وbackpointer (المؤشر الخلفي) في الخلية الأخيرة يقول ذلك مسبقًا.
What the cost function can encodeما الذي يمكن أن تُرمّزه دالة التكلفة
Slide 86 spells out the unit Substitution cost: sub(a, b) = 0 if a = b, else 1. It also says the cost can be weighted, and this is where edit distance stops being a counting exercise and becomes a model. SLP3's caption to its pseudocode notes that costs can be specific to the letter, and its text adds that for spelling correction substitutions are more likely between letters that are next to each other on the keyboard. Kernighan, Church and Gale estimated four confusion matrices (deletion, addition, substitution and reversal counts) from the typos in 44 million words of 1988 AP newswire and used them as the channel probabilities of a noisy-channel spelling corrector; their top candidate agreed with the majority of three human judges in 87 percent of 329 cases. Set a substitution cost to the negative log of such a probability and the cheapest alignment becomes the most probable one.
الشريحة 86 توضح substitution cost (تكلفة الاستبدال) الوحدوية: sub(a, b) = 0 إذا a = b، وإلا 1. وتقول أيضًا إن التكلفة يمكن أن تكون موزونة، وهنا تتوقف مسافة التحرير عن كونها تمرين عدّ وتصبح نموذجًا. يذكر تعليق SLP3 على شيفرته الزائفة أن التكاليف يمكن أن تكون خاصة بكل حرف، ويضيف نصه أن الاستبدالات في تصحيح الإملاء أرجح بين الحروف المتجاورة على لوحة المفاتيح. قدّر Kernighan وChurch وGale أربع مصفوفات التباس (confusion matrices) (أعداد الحذف والإضافة والاستبدال والعكس) من الأخطاء المطبعية في 44 مليون كلمة من أخبار AP لعام 1988، واستخدموها احتمالاتِ القناة في مصحح إملاء قائم على نموذج القناة المشوِّشة (noisy channel)؛ واتفق مرشحهم الأول مع أغلبية ثلاثة محكّمين بشريين في 87 بالمئة من 329 حالة. اجعل تكلفة الاستبدال مساوية للوغاريتم السالب لاحتمال كهذا، فتصبح أرخص محاذاة هي الأكثر احتمالًا.
| Cost functionدالة التكلفة | sub(a, b)sub(a, b) | Nameالاسم | intention to executionمن intention إلى execution |
|---|---|---|---|
| Unit (slides 85 and 86)وحدوية (الشريحتان 85 و86) | 0 if a = b, else 10 إذا a = b، وإلا 1 | Levenshtein distanceمسافة Levenshtein | 55 |
| Substitution cost 2 (SLP3 tables)تكلفة استبدال 2 (جداول SLP3) | 0 if a = b, else 20 إذا a = b، وإلا 2 | Levenshtein's no-substitution variantصيغة Levenshtein بلا استبدال | 88 |
| Confusion-weightedموزونة بالالتباس | A value from a confusion matrixقيمة من مصفوفة التباس | Noisy-channel spelling correctionتصحيح الإملاء بنموذج القناة المشوِّشة | Depends on the matrixتعتمد على المصفوفة |
A cost function can also grow a fourth operation. Damerau's 1964 study listed transposition of two adjacent letters as one of the four single-error types. The simplest extension adds a fourth line to the Wagner-Fischer table, D[i-2, j-2] + cost, that applies when x_{i-1} = y_j and x_i = y_{j-1}; this restricted form is often called optimal string alignment distance, and it can overcount when a transposed pair is edited again. Lowrance and Wagner's 1975 algorithm handles that general case, and both are commonly labelled Damerau-Levenshtein distance. The typo tehcosts 2 with the three classic operations (delete one letter, insert it elsewhere) but only 1 with transposition. The slide recurrence does not include this move; treat it as an optional fourth line you can add when the application calls for it.
ويمكن لدالة التكلفة أيضًا أن تضيف عملية رابعة. دراسة Damerau عام 1964 عدّت تبديل موضع حرفين متجاورين (transposition) أحد أنواع الخطأ المفرد الأربعة. أبسط امتداد يضيف سطرًا رابعًا إلى جدول Wagner-Fischer، هو D[i-2, j-2] + cost، يُطبّق عندما x_{i-1} = y_j وx_i = y_{j-1}؛ وهذه الصيغة المقيّدة تُسمّى غالبًا مسافة المحاذاة المثلى للسلاسل (optimal string alignment distance)، وقد تبالغ في العدّ عندما يُعدَّل زوج مبدَّل مرة أخرى. أما خوارزمية Lowrance وWagner لعام 1975 فتعالج تلك الحالة العامة، وكلتاهما تُسمّى عادةً Damerau-Levenshtein distance. الخطأ المطبعي teh يكلّف 2 بالعمليات الكلاسيكية الثلاث (احذف حرفًا وأدرجه في مكان آخر) لكنه يكلّف 1 فقط مع التبديل. علاقة الشريحة لا تتضمن هذه الحركة؛ فتعامل معها كسطر رابع اختياري يمكنك إضافته عندما يتطلبه التطبيق.
Recall
Write the recurrence for D[i, j] with its initialization and say where the answer sits.اكتب العلاقة التكرارية لـ D[i, j] مع تهيئتها، وقل أين تقع الإجابة.
Recall
Why is D[i, 0] = i?لماذا D[i, 0] = i؟
Recall
flaw versus lawn: what are the Hamming distance and the edit distance, and why do they differ?flaw مقابل lawn: ما مسافة Hamming وما مسافة التحرير، ولماذا تختلفان؟
Quick checkاختبار سريع
Which operation explains why D[i, 0] = i under unit costs?أي عملية تفسّر لماذا D[i, 0] = i في التكاليف الوحدوية؟
Recapالخلاصة
If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا
- Minimum edit distance is the cheapest sequence of insertions, deletions and substitutions from source to target; with unit costs it is the Levenshtein distance.مسافة التحرير الدنيا هي أرخص متتالية من الإدراج والحذف والاستبدال تحوّل المصدر إلى الهدف؛ ومع التكاليف الوحدوية تُسمّى مسافة Levenshtein.
- Applications: spelling correction, OCR post-processing, word error rate for speech recognition, approximate matching and alignment.التطبيقات: تصحيح الإملاء، والمعالجة اللاحقة لمخرجات OCR، ومعدل خطأ الكلمات (WER) في التعرّف على الكلام، والمطابقة التقريبية، والمحاذاة.
- WER = (I + S + D) / reference words, read off a word-level alignment; insertions count, so it can exceed 100 percent.WER = (I + S + D) مقسومًا على عدد كلمات المرجع، ويُقرأ من محاذاة على مستوى الكلمات؛ الإدراجات تُحسب، لذلك قد يتجاوز 100 بالمئة.
- An alignment is a set of columns; its cost is the sum of column costs; the distance is the cost of the cheapest alignment; several alignments can tie.المحاذاة مجموعة من الأعمدة؛ تكلفتها مجموع تكاليف أعمدتها؛ والمسافة هي تكلفة أرخص محاذاة؛ وقد تتعادل عدة محاذاات في التكلفة.
- intention to execution costs 5 under unit costs and 8 when a substitution costs 2. Always state the convention.تكلفة intention إلى execution تساوي 5 في التكاليف الوحدوية و8 عندما يكلّف الاستبدال 2. صرّح دائمًا بالاصطلاح.
- The search tree over strings explodes (about 494 children per step for a 9-letter word); the grid over prefix pairs has (m + 1)(n + 1) = 100 cells.شجرة البحث على السلاسل تنفجر (نحو 494 ابنًا في كل خطوة لكلمة من 9 أحرف)؛ أما الشبكة على أزواج البادئات ففيها (m + 1)(n + 1) = 100 خلية.
- Down consumes a source letter (deletion), right produces a target letter (insertion), diagonal pairs two letters (substitution or match).النزول يستهلك حرفًا من المصدر (حذف)، والاتجاه يمينًا ينتج حرفًا من الهدف (إدراج)، والقُطر يقرن حرفين (استبدال أو تطابق).
- D[0,0] = 0, D[i,0] = i, D[0,j] = j; D[i,j] is the minimum of the three neighbors plus their operation cost; the answer is D[m,n].D[0,0] = 0 و D[i,0] = i و D[0,j] = j؛ و D[i,j] هي أصغر قيمة بين الجيران الثلاثة مضافًا إليها تكلفة عمليتها؛ والإجابة هي D[m,n].
- sub(a,b) = 0 if a = b else 1 is one choice; substitution cost 2, confusion-weighted costs and transposition (Damerau-Levenshtein) are others.sub(a,b) = 0 إذا a = b وإلا 1 هو خيار واحد؛ ومن الخيارات الأخرى تكلفة استبدال 2، والتكاليف الموزونة بمصفوفة الالتباس (confusion matrix)، والتبديل (Damerau-Levenshtein).
Sourcesالمصادر
- Speech and Language Processing, chapter 2: Words and Tokens, section 2.9 Minimum Edit DistanceBookJurafsky and Martin, draft of August 2026Definition, alignment figure 2.17, search figure 2.18, path figure 2.19, cost-2 table figure 2.20, pseudocode 2.21, backtrace 2.22التعريف، وشكل المحاذاة 2.17، وشكل البحث 2.18، وشكل المسار 2.19، وجدول التكلفة 2 في الشكل 2.20، والشيفرة الزائفة 2.21، والتتبّع الخلفي 2.22(opens in a new tab)(يفتح في تبويب جديد)
- Speech and Language Processing, chapter 16: Automatic Speech Recognition, section 16.6 Word Error RateBookJurafsky and Martin, draft of August 2026WER formula, the CallHome example with 76.9 percent, and why the rate can exceed 100 percentصيغة WER، ومثال CallHome بنسبة 76.9 بالمئة، ولماذا يمكن أن يتجاوز المعدل 100 بالمئة(opens in a new tab)(يفتح في تبويب جديد)
- Binary codes capable of correcting deletions, insertions and reversalsPaperSoviet Physics Doklady 10, 1966 (V. I. Levenshtein)Origin of the distance and of the no-substitution variant equivalent to substitution cost 2أصل المسافة، وأصل الصيغة التي لا تسمح بالاستبدال والمكافئة لتكلفة استبدال 2(opens in a new tab)(يفتح في تبويب جديد)
- The String-to-String Correction ProblemPaperJournal of the ACM 21(1), 1974 (Wagner and Fischer)The dynamic programming algorithm in time proportional to the product of the lengthsخوارزمية البرمجة الديناميكية بزمن يتناسب مع حاصل ضرب الطولين(opens in a new tab)(يفتح في تبويب جديد)
- A technique for computer detection and correction of spelling errorsPaperCommunications of the ACM 7(3), 1964 (Damerau)Single-error types including transposition; about 80 percent of errors are one edit awayأنواع الخطأ المفرد ومنها التبديل؛ نحو 80 بالمئة من الأخطاء تبعد تعديلًا واحدًا(opens in a new tab)(يفتح في تبويب جديد)
- An Extension of the String-to-String Correction ProblemPaperJournal of the ACM, 1975 (Lowrance and Wagner)Adds adjacent transposition to the Wagner-Fischer recurrence in its general, unrestricted formتضيف تبديل الحرفين المتجاورين إلى علاقة Wagner-Fischer التكرارية بصيغتها العامة غير المقيّدة(opens in a new tab)(يفتح في تبويب جديد)
- A Spelling Correction Program Based on a Noisy Channel ModelPaperCOLING 1990 (Kernighan, Church and Gale)Four confusion matrices estimated from 44 million words of 1988 AP newswire; 87 percent agreement with judges on 329 casesأربع مصفوفات التباس مقدّرة من 44 مليون كلمة من أخبار AP لعام 1988؛ واتفاق بنسبة 87 بالمئة مع المحكّمين في 329 حالة(opens in a new tab)(يفتح في تبويب جديد)
- Error Detecting and Error Correcting CodesPaperBell System Technical Journal 29(2), 1950 (Hamming)Hamming distance: substitutions only, equal lengthsمسافة Hamming: استبدالات فقط، وأطوال متساوية(opens in a new tab)(يفتح في تبويب جديد)
- Dynamic ProgrammingBookPrinceton University Press, 1957 (Bellman)The table-driven method of combining subproblem solutionsالطريقة القائمة على الجداول لجمع حلول المسائل الفرعية(opens in a new tab)(يفتح في تبويب جديد)
- SCTK, the NIST Scoring Toolkit (sclite)DocsNISTStandard WER scorer that performs the word-level alignmentالمقيّم القياسي لـ WER، وهو ينفّذ المحاذاة على مستوى الكلمات(opens in a new tab)(يفتح في تبويب جديد)