0% found this document useful (0 votes)
22 views

Module2 Ch3 B

Uploaded by

pomono1988
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Module2 Ch3 B

Uploaded by

pomono1988
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 96

Spelling Error Detection and Correction

▪ Common string variations


▪ Error Types
▪ Approaches
▪ Algorithms
▪ The edit distance between two strings (Minimum Edit distance)
▪ Dynamic programming calculation of edit distance

Gayana M N Module 2 – Word Level Analysis 1


Spelling Error Detection and Correction
Sources of Common String Variations
▪ Typing errors
▪ Spelling errors
▪ Common typing mistakes involve single character :
▪ omission
▪ insertion
▪ substitution
▪ reversal (transposition)
▪ 80% were single-error misspellings (Damearu, 1964)

Gayana M N Module 2 – Word Level Analysis 2


Spelling Error Detection and Correction
Sources of Common String Variations – Typing Errors
80% were single-error misspellings (Damearu, 1964)
1. Omission of a single letter
▪ 'concept' typed as 'concpt’
2. Insertion of a single letter
▪ 'error' typed as 'errorn'
3. Substitution of a single letter
▪ 'error' typed as 'errpr’
4. Transposition of two adjacent letters
▪ 'are' typed as 'aer'
▪ Most common type was substitution, followed by omission of a letter and then
insertion of a letter. (Shafer and Hardwick, 1968)
Gayana M N Module 2 – Word Level Analysis 3
Spelling Error Detection and Correction
Sources of Common String Variations – Typing Errors
▪ Optical character recognition (OCR)/Automatic reading devices
1. Substitution
▪ due to visual similarity (1→l, c→ e, r → n)
2. Multi-substitution (or framing)
▪ m → rn
3. Space deletion
4. Space insertion
5. Failures
▪ when OCR algorithm fails to select a letter with sufficient accuracy.
▪ Error Correction using 'context' or using 'linguisticstructures’.
Gayana M N Module 2 – Word Level Analysis 4
Spelling Error Detection and Correction
Sources of Common String Variations – Spelling Errors
▪ Many approaches to speech recognition deal with strings of
phonemes(symbols representing sounds), attempt to match a spoken
utterance with a dictionary of known utterances.
▪ In speech recognition, errors are mainly phonetic.
▪ Misspelled word is pronounced in the same way as correct word.
▪ Distort the word by more than a single insertion, deletion or substitution.
▪ Phonetic variations are common in transliteration.

Gayana M N Module 2 – Word Level Analysis 5


Spelling Error Detection and Correction
Spelling Error – Examples
▪ Two distinct categories:
1. Non-word errors
2. Real-word errors

Gayana M N Module 2 – Word Level Analysis 6


Spelling Error Detection and Correction
Spelling Error – Examples
▪ Two distinct categories:

1. Non-word errors
▪ Error resulting in a wordthat does notappearin a given lexiconor is notavalid
orthographicword.

Techniques for detection (N ow considered a solved problem)


▪ n-gram analysis
▪ dictionary lookup

Gayana M N Module 2 – Word Level Analysis 7


Spelling Error Detection and Correction
Spelling Error – Examples
▪ Two distinct categories:
1. Real-word errors
▪ Occurs in actual words of the language.
▪ Due to :
▪ Typographical mistakes
▪ Spelling errors
▪ Substituting the spelling of a homophone or near homo-phone
▪ Eg: 'piece' for 'peace' or 'meat' for 'meet’
▪ Real-word errors may cause local syntactic errors, global syntactic errors,
semantic errors or errors at discourse or pragmatic levels.
▪ Impossible to decide that a word is wrong without some contextual
information.
Gayana M N Module 2 – Word Level Analysis 8
Spelling Error Detection and Correction

Spelling Correction Approaches


▪ Consists of:
▪ Detecting Errors
▪ Finding misspelled words.
▪ Correcting Errors
▪ Suggesting correct words to a misspelled one.
Approaches
▪ Isolated-error detection and correction.
▪ Context-dependent error detection and correction.

Gayana M N Module 2 – Word Level Analysis 9


Spelling Error Detection and Correction - Approaches
Isolated-error detection and correction.
▪ Each word is checked separately, independent of its context.
▪ Why not Dictionary Lookup ? -- Problems !!!
1. Requires the existence of a lexicon containing all correct words –
compilation time and space issues.
2. Highly productive languages → impossible to list all correct words.
3. Strategy fails when spelling error produces a word that belongs to a
lexicon.
▪ Eg: 'theses' in place of 'these' (Real-word error).
4. Larger the lexicon → Error goes undetected.
▪ Chance of word being found in larger lexicon is greater.

Gayana M N Module 2 – Word Level Analysis 10


Spelling Error Detection and Correction - Approaches

Context-dependent detection and correction

▪ Use the context of a word to detect and correct errors.


▪ Requires grammatical analysis
▪ More complex
▪ Language dependent
▪ Employs isolated-word method to obtain candidate words before making a
selection depending on context.

Gayana M N Module 2 – Word Level Analysis 11


Spelling Error Detection and Correction - Approaches

Spelling Correction Algorithms

▪ Minimum Edit Distance


▪ Similarity key techniques
▪ n-gram based techniques
▪ Neural nets
▪ Rule-based Techniques

Gayana M N Module 2 – Word Level Analysis 12


Spelling Error Detection and Correction - Approaches
Spelling Correction Algorithms

▪ Minimum Edit Distance (will be discussed later....)


▪ Similarity key techniques
▪ n-gram based techniques
▪ Neural nets
▪ Rule-based Techniques

Gayana M N Module 2 – Word Level Analysis 13


Spelling Correction Algorithms

Similarity key techniques


▪ Change given string into a key such that similar strings will change into the
same key.
▪ Used in SOUNDEX system for phonetic spelling correction
applications.

Gayana M N Module 2 – Word Level Analysis 14


Spelling Correction Algorithms

Similarity key techniques


▪ Change given string into a key such that similar strings will change into the
same key.
▪ Used in SOUNDEX system for phonetic spelling correction
applications.

Gayana M N Module 2 – Word Level Analysis 15


Spelling Correction Algorithms

Similarity key techniques

Gayana M N Module 2 – Word Level Analysis 16


Spelling Correction Algorithms

Similarity key techniques

Gayana M N Module 2 – Word Level Analysis 17


Spelling Correction Algorithms
Similarity key techniques

Gayana M N Module 2 – Word Level Analysis 18


Spelling Correction Algorithms

n-gram based techniques


▪ Can be used for real-word and non-word error detection.

Gayana M N Module 2 – Word Level Analysis 19


Spelling Correction Algorithms
n-gram based techniques
▪ Can be used for real-word and non-word error detection.

n-gram for Non-word error Detection


▪ Based on the idea that certain bi-grams and tri-grams never occuror rarely
occur.
▪ Eg: qst, qd
▪ Strings containing these unusual n-grams → possible spelling errors

▪ Require large corpus/dictionary as training data for compilingn-gramtable


of possible combinations of letters.
Gayana M N Module 2 – Word Level Analysis 20
Spelling Correction Algorithms

n-gram based techniques


▪ Can be used for real-word and non-word error detection.

n-gram for real-word error Detection


▪ Calculate the Likelihood of onecharacter followinganother.
▪ Use the information to find possible correct word candidates.

Gayana M N Module 2 – Word Level Analysis 21


Spelling Correction Algorithms

Neural Nets

▪ Have the ability to do associativerecallbased on incomplete and noisy


data.
▪ Train them to adapt to specific spelling error patterns
▪ Computationally expensive.

Cherkassky, Vladimir, et al. "Conventional and associative memoryapproachesto automatic spelling


correction." Engineering Applications of Artificial Intelligence 5.3 (1992): 223-237.

Gayana M N Module 2 – Word Level Analysis 22


Spelling Correction Algorithms

Rule-based Techniques

▪ Set ofrules(heuristics) derived from knowledge of commonspellingerror


pattern is used to transform misspelled words into valid words.
▪ Observation: many error occurrence occurs from 'ue' typed as 'eu’
▪ Form a rule ue → eu

Gayana M N Module 2 – Word Level Analysis 23


Minimum Edit Distance

Definition: Minimum number of operations (insertions(I), deletions(D),


substitutions/replacements(R)) required to transform one string into
another.

▪ Edit distance is also called as the Levenshtein distance.

▪ A string over the alphabet I, D, R, M that describes a transformation of


one string to another is called as an edit transcript.

Gayana M N Module 2 – Word Level Analysis 24


Minimum Edit Distance

Definition: Minimum number of operations (insertions(I), deletions(D),


substitutions/ replacements(R)) required to transform one string into
another.

Example
Transformation of string “tutor” to “tumour” and its associated 'edit transcript'
(MMRMIM).
M M R M I M
Minimum Edit Distance = 2 t u t o r
t u m o u r
Gayana M N Module 2 – Word Level Analysis 25
Minimum Edit Distance

Definition: Minimum number of operations (insertions(I), deletions(D),


substitutions/ replacements(R)) required to transform one string into
another.

Example
Transformation of string “vintner” to “writers” and its associated 'edit transcript'
(RIMDMDMMI).
R I M D M D M M I
Minimum Edit v i n t n e r
Distance = 5
w r i t e r s
Gayana M N Module 2 – Word Level Analysis 26
Minimum Edit Distance

▪ Minimum Edit Distance between two strings can be represented as a


binary function, ed, which maps two strings to their edit distance.
▪ ed is symmetric.
▪ For any two strings, s and t, ed(s, t) is always equal to ed(t, s).

Gayana M N Module 2 – Word Level Analysis 27


Minimum Edit Distance

▪ Edit distance is viewed as a string alignment problem.


▪ An alignment is an equivalent alternative to an edit transcript for
indicating differences and similarities between strings.
▪ By aligning two strings, we can measure the degreeto which they match.
▪ There can be more than one possible alignment between two strings.
▪ The best possible alignment corresponds to the minimum edit distance
between the strings.

Gayana M N Module 2 – Word Level Analysis 28


Minimum Edit Distance

▪ Definition: A (global) alignment of 2 strings S1 and S2 is obtained by


first inserting chosen spaces (or dashes), either into or at the ends of S1
and S2, and then placing the resulting strings one above the other so
that every character or space is opposite a unique character or a unique
space in the other string.
▪ 'global’ → Entire string participates in the alignment
Example
A global alignment of “vintner” and “writers”

Gayana M N Module 2 – Word Level Analysis 29


Minimum Edit Distance

M M R M I M
t u t o r
t u m o u r

t u t o _ r
t u m o u r

Edit Distance = 2
Gayana M N Module 2 – Word Level Analysis 30
Minimum Edit Distance

Permitted edit operations:


▪ Insertion – I
▪ A dash in the upper string indicates Insertion.
▪ Deletion – D
▪ A dash in the lower string indicates Deletion.
▪ Substitution (Replacement) – R
▪ A Substitution occurs when the two alignment symbols do not match.

Levenshtein Distance between two sequences is obtained by assigning a unit


cost to each operation.

Gayana M N Module 2 – Word Level Analysis 31


Minimum Edit Distance

M M D I M I M
t u t o r
t u m o u r

t u t _ o _ r
t u _ m o u r

Edit Distance = 3
Gayana M N Module 2 – Word Level Analysis 32
Minimum Edit Distance

M M R M I M
t u t o r
t u m o u r

t u t o _ r
t u m o u r

Minimum Edit Distance = 2


Gayana M N Module 2 – Word Level Analysis 33
Minimum Edit Distance

Dynamic Programming for finding Minimum Edit Distance

▪ Table-driven approach is applied to solve problems by combining


solutions to sub-problems.

▪ The most classicinexact matchingproblemsolved by dynamic programming:


the edit distance problem.

Gayana M N Module 2 – Word Level Analysis 34


Minimum Edit Distance
Dynamic Programming for finding Minimum Edit Distance
▪ Dynamic programming algorithm for minimum edit distance is
implemented by created an edit distance matrix.
▪ The matrix has one row for each symbol in the source string and one
column for each symbol in the target string.
▪ The (i, j)th cell in this matrix represents the distance between the first i
characters of the source and the first j characters of target string.
▪ Each cell is computed as a simple function of its surrounding cells.
▪ By starting at the beginning of the matrix, it is possible to fill each entry
iteratively.

Gayana M N Module 2 – Word Level Analysis 35


Minimum Edit Distance

Dynamic Programming for finding Minimum Edit Distance


▪ The edit distance between strings S1[1.. n] and S2[1.. m] can be
computed applying dynamic programming.
▪ Define D(i, j) to be the edit distance of prefixes S1[1..i] and S2[1..j]
▪ D(n, m) is the edit distance of S1 and S2.
▪ Dynamic programming computes D(n, m) by computing D(i, j) for all
i ≤ n and j ≤ m.

Gayana M N Module 2 – Word Level Analysis 36


Minimum Edit Distance
Dynamic Programming for finding Minimum Edit Distance
Dynamic programming (of the edit distance) has three essential components:
▪ Recurrence relation
▪ How is D(i, j) determined from values D(i′, j′) where i′ and j′ are index
pairs smaller than i, j ?
▪ Tabular computation
▪ How to memorize computed values, to avoid computing them over and
over again?
▪ Traceback
▪ How to find an optimal edit transcript?

Gayana M N Module 2 – Word Level Analysis 37


Minimum Edit Distance

The Recurrence Relation


▪ How to determine the D(i, j) values ?

Gayana M N Module 2 – Word Level Analysis 38


Minimum Edit Distance

The Recurrence Relation


▪ How to determine the D(i, j) values ?

Base conditions for D(i, j)


D(i, 0) = i
D(0, j) = j

Gayana M N Module 2 – Word Level Analysis 39


Minimum Edit Distance

The Recurrence Relation


How to determine the D(i, j) values ?

Base conditions for D(i, j)


D(i, 0) = i
D(0, j) = j
▪ How to edit first i characters of S1 to zero character of S2 ?

Gayana M N Module 2 – Word Level Analysis 40


Minimum Edit Distance

The Recurrence Relation


How to determine the D(i, j) values ?

Base conditions for D(i, j)


D(i, 0) = i
D(0, j) = j
▪ How to edit first i characters of S1 to zero character of S2 ?
With i deletions !! → D(i, 0) = i, i , 0 ≤ i ≤ n.

Gayana M N Module 2 – Word Level Analysis 41


Minimum Edit Distance

The Recurrence Relation


How to determine the D(i, j) values ?

Base conditions for D(i, j)


D(i, 0) = i
D(0, j) = j
Similarly, we have,
D(0, j) = j

Gayana M N Module 2 – Word Level Analysis 42


Minimum Edit Distance

The Recurrence Relation


How to determine the D(i, j) values ?

Base conditions for D(i, j)


D(i, 0) = i
D(0, j) = j
Similarly, we have,
D(0, j) = j
▪ How to transform zero characters of S1 to j characters of S2 ?

Gayana M N Module 2 – Word Level Analysis 43


Minimum Edit Distance
The Recurrence Relation
How to determine the D(i, j) values ?

Base conditions for D(i, j)


D(i, 0) = i
D(0, j) = j
Similarly, we have,
D(0, j) = j
▪ How to transform zero characters of S1 to j characters of S2 ?
▪ Insert j characters of S2 !!

Gayana M N Module 2 – Word Level Analysis 44


Minimum Edit Distance
The Recurrence Relation
How to determine the D(i, j) values ?

Base conditions for D(i, j)


D(i, 0) = i
D(0, j) = j
Similarly, we have,
D(0, j) = j
▪ How to transform zero characters of S1 to j characters of S2 ?
▪ Insert j characters of S2 → D(0, j) = j, j , 0 ≤ j ≤ m.

Gayana M N Module 2 – Word Level Analysis 45


Minimum Edit Distance
The Recurrence Relation

Inductive Case for i, j > 0


D(i, j) = min [ D(i, j−1) + delete_cost,
D(i − 1, j) + insert_cost,
D(i−1, j−1) + sub_cost t(S1i , S2j)]

where t(S1i , S2j) = 0, if (S1[i] = = S2[j])


= 1, if (S1[i] ≠ S2[j])

Gayana M N Module 2 – Word Level Analysis 46


Minimum Edit Distance

Example:

S1 = vintner (7 characters)
S2 = writers (7 characters)
Cost = 1

Gayana M N Module 2 – Word Level Analysis 47


Minimum Edit Distance

Gayana M N Module 2 – Word Level Analysis 48


Minimum Edit Distance
# w r i t e r s
#
v
i
n
t
n
e
r
Gayana M N Module 2 – Word Level Analysis 49
Minimum Edit Distance

The Recurrence Relation


▪ How to determine the D(i, j) values ?

Base conditions for D(i, j)


D(i, 0) = i
D(0, j) = j

Gayana M N Module 2 – Word Level Analysis 50


Minimum Edit Distance
# w r i t e r s
# 0
v 1
i 2

D(i, 0) = i n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 51
Minimum Edit Distance D(0, j) = j
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1
i 2

D(i, 0) = i n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 52
Minimum Edit Distance

Now, compute the remaining cells.


▪ Inner cells can be computed in any order
▪ row-wise,
▪ column-wise or
▪ in successive anti-diagonals
such that the three values required by the recurrence have been computed.

D(i-1, j-1) D(i-1, j)

D(i, j-1) D(i, j)

Gayana M N Module 2 – Word Level Analysis 53


Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1
i 2
n 3
t 4 D(i, j) = min [ D(i, j− 1) + delete_cost,
D(i − 1, j) + insert_cost,
n 5
D(i−1, j−1) + sub_cost
e 6 t(S1i , S2j)]

r 7
Gayana M N Module 2 – Word Level Analysis 54
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1
+1
i 2
n 3
t 4 D(i, j) = min [ D(i, j− 1) + delete_cost,
D(i − 1, j) + insert_cost,
n 5
D(i−1, j−1) + sub_cost
e 6 t(S1i , S2j)]

r 7
Gayana M N Module 2 – Word Level Analysis 61
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1
v 1
+1
i 2
n 3
t 4 D(i, j) = min [ D(i, j− 1) + delete_cost,
D(i − 1, j) + insert_cost,
n 5
D(i−1, j−1) + sub_cost
e 6 t(S1i , S2j)]

r 7
Gayana M N Module 2 – Word Level Analysis 62
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1 +1
v 1
+1
i 2
n 3
t 4 D(i, j) = min [ D(i, j− 1) + delete_cost,
D(i − 1, j) + insert_cost,
n 5
D(i−1, j−1) + sub_cost
e 6 t(S1i , S2j)]

r 7
Gayana M N Module 2 – Word Level Analysis 63
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1 +1
v 1 1
+1
i 2
n 3
t 4 D(i, j) = min [ D(i, j− 1) + delete_cost,
D(i − 1, j) + insert_cost,
n 5
D(i−1, j−1) + sub_cost
e 6 t(S1i , S2j)]

r 7
Gayana M N Module 2 – Word Level Analysis 58
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1
v 1 1
i 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 59
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1
v 1 1 2
i 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 60
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1
v 1 1 2 3
i 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 61
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1
v 1 1 2 3 4 5
i 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 62
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1
v 1 1 2 3 4 5 6
i 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 63
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
+1
v 1 1 2 3 4 5 6 7
i 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 64
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 + 1
1 2 3 4 5 6 7
i 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 65
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 + 1
1 2 3 4 5 6 7
i 2 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 66
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
+1
i 2 2 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 67
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
2 +1
i 2 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 68
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
+0
i 2 2 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 69
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 +0 3 4 5 6 7
i 2 2 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 70
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 +0 3 4 5 6 7
i 2 2 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 71
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 +0 3 4 5 6 7
i 2 2 2 2
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 72
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 +1 3
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 73
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 +1 4
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 74
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 +1 5
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 75
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 +1 6
n 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 76
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
+1
n 3 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 77
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
+1
n 3 3 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 78
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
+1
n 3 3 3 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 79
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
+1
n 3 3 3 3 3
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 80
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
+1
n 3 3 3 3 3 4
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 81
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
+1
n 3 3 3 3 3 4 5
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 82
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
+1
n 3 3 3 3 3 4 5 6
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 83
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
t 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 84
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 + 1 3 3 3 3 4 5 6
t 4 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 85
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 +1 3 3 3 4 5 6
t 4 4 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 86
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 +1 3 4 5 6
t 3
4 4 4 4
n 5
e 6
r 7 Gayana M N Module 2 – Word Level Analysis 87
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 +0 3 4 5 6
t 4 4 4 4 3
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 88
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
+1
t 4 4 4 4 3 4
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 89
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
+1
t 4 4 4 4 3 4 5
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 90
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
+1
t 4 4 4 4 3 4 5 6
n 5
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 91
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
t 4 4 4 4 3 4 5 6
n 5 5 5 5 4 4 5 6
e 6
r 7
Gayana M N Module 2 – Word Level Analysis 92
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
t 4 4 4 4 3 4 5 6
n 5 5 5 5 4 4 5 6
e 6 6 6 6 5 4 5 6
r
Gayana M N Module 2 – Word Level Analysis 93
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
t 4 4 4 4 3 4 5 6
n 5 5 5 5 4 4 5 6
e 6 6 6 6 5 4 5 6
r 7 7 6 7 6 5 4 5
Gayana M N Module 2 – Word Level Analysis 94
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
t 4 4 4 4 3 4 5 6
n 5 5 5 5 4 4 5 6
e 6 6 6 6 5 4 5 6
r 7 7 6 7 6 5 4 5
Gayana M N Module 2 – Word Level Analysis 95
Minimum Edit Distance
# w r i t e r s
# 0 1 2 3 4 5 6 7
v 1 1 2 3 4 5 6 7
i 2 2 2 2 3 4 5 6
n 3 3 3 3 3 4 5 6
Minimum
t 4 4 4 4 3 4 5 6 Edit
Distance
n 5 5 5 5 4 4 5 6
e 6 6 6 6 5 4 5 6
r 7 7 6 7 6 5 4 5
Gayana M N Module 2 – Word Level Analysis 96

You might also like