Professional Documents
Culture Documents
Chapter 2
Formally,
- an algebraic notation for characterizing a set of strings.
If the caret ^ is the first symbol after the open square brace [,
- the resulting pattern is negated.
If the caret ^ is the first symbol after the open square brace [,
- the resulting pattern is negated.
If the caret ^ occurs anywhere else,
- it usually stands for a caret ^.
If the caret ^ is the first symbol after the open square brace [,
- the resulting pattern is negated.
If the caret ^ occurs anywhere else,
- it usually stands for a caret ^.
Use the *
Use the *
Pronounced “cleany star”.
Use the *
Pronounced “cleany star”.
Means “zero or more occurrences of the immediately previous
character or regular expression”.
The caret ^
- matches the start of a line.
The caret ^
- matches the start of a line.
The pattern /^The/ matches
- the word The only at the start of a line.
Write a RE for
- any machine with at least 6 GHz and 500 GB of disk space
for less than $1000.
Write a RE for
- any machine with at least 6 GHz and 500 GB of disk space
for less than $1000.
Text Normalization 33 / 65
Corpora
Edit Distance 49 / 65
Edit Distance
Edit Distance 50 / 65
Edit Distance
Edit Distance 50 / 65
Edit Distance
Edit Distance 50 / 65
Edit Distance
Edit Distance 51 / 65
Edit Distance
Edit Distance 51 / 65
Edit Distance
Edit Distance 51 / 65
Edit Distance
Edit Distance 52 / 65
Edit Distance
Edit Distance 52 / 65
Edit Distance
What is the gap between intention and execution?
Visualize the problem as an alignment between the two strings.
Edit Distance 52 / 65
Edit Distance
What is the gap between intention and execution?
Visualize the problem as an alignment between the two strings.
delete an I
Edit Distance 52 / 65
Edit Distance
What is the gap between intention and execution?
Visualize the problem as an alignment between the two strings.
delete an I
substitute E for N
Edit Distance 52 / 65
Edit Distance
What is the gap between intention and execution?
Visualize the problem as an alignment between the two strings.
delete an I
substitute E for N
substitute X for T
Edit Distance 52 / 65
Edit Distance
What is the gap between intention and execution?
Visualize the problem as an alignment between the two strings.
delete an I
substitute E for N
substitute X for T
insert C
Edit Distance 52 / 65
Edit Distance
What is the gap between intention and execution?
Visualize the problem as an alignment between the two strings.
delete an I
substitute E for N
substitute X for T
insert C
substitute U for N
Edit Distance 52 / 65
Edit Distance
Edit Distance 53 / 65
Edit Distance
Edit Distance 53 / 65
Edit Distance
Edit Distance 53 / 65
Edit Distance
Edit Distance 53 / 65
Edit Distance
Edit Distance 53 / 65
Edit Distance
Edit Distance 53 / 65
Edit Distance
Edit Distance 54 / 65
Edit Distance
Edit Distance 54 / 65
Edit Distance
Edit Distance 54 / 65
Edit Distance
Edit Distance 54 / 65
Edit Distance
Edit Distance 54 / 65
Minimum Edit Distance
Edit Distance 55 / 65
Minimum Edit Distance
Edit Distance 55 / 65
Minimum Edit Distance
Edit Distance 55 / 65
Minimum Edit Distance
Edit Distance 55 / 65
Dynamic programming
A class of algorithms
Edit Distance 56 / 65
Dynamic programming
A class of algorithms
Apply a table-driven method
- to solve problems by combining solutions to sub-problems.
Edit Distance 56 / 65
Dynamic programming
A class of algorithms
Apply a table-driven method
- to solve problems by combining solutions to sub-problems.
Edit Distance 56 / 65
Dynamic programming
A class of algorithms
Apply a table-driven method
- to solve problems by combining solutions to sub-problems.
Edit Distance 56 / 65
Minimum Edit Distance Algorithm
Edit Distance 57 / 65
Minimum Edit Distance Algorithm
Edit Distance 57 / 65
Minimum Edit Distance Algorithm
Edit Distance 57 / 65
Minimum Edit Distance Algorithm
Base conditions:
D(i, 0) = del-cost(i)
D(0, j) = ins-cost(j)
Edit Distance 58 / 65
Minimum Edit Distance Algorithm
Base conditions:
D(i, 0) = del-cost(i)
D(0, j) = ins-cost(j)
Recurrence conditions:
Edit Distance 58 / 65
Minimum Edit Distance Algorithm
Base conditions:
D(i, 0) = del-cost(i)
D(0, j) = ins-cost(j)
Recurrence conditions:
Edit Distance 58 / 65
Minimum Edit Distance Algorithm
Edit Distance 59 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum Edit Distance Algorithm
Edit Distance 60 / 65
Minimum cost alignment
Edit Distance 61 / 65
Minimum cost alignment
Edit Distance 61 / 65
Minimum cost alignment
Edit Distance 61 / 65
Minimum cost alignment
Augment the minimum edit distance algorithm
- to store backpointers in each cell.
Perform a backtrace from the final cell to the initial cell.
Each complete path between the final cell and the initial cell is a
minimum distance alignment.
Edit Distance 61 / 65
Home Work
Home Work 62 / 65
Home Work
Exercises
2.1 RE
Home Work 63 / 65
Home Work
Exercises
2.1 RE
2.2 RE
Home Work 63 / 65
Home Work
Exercises
2.1 RE
2.2 RE
2.3 ELIZA-like program
Home Work 63 / 65
Home Work
Exercises
2.1 RE
2.2 RE
2.3 ELIZA-like program
2.4 Minimum edit distance
Home Work 63 / 65
Home Work
Exercises
2.1 RE
2.2 RE
2.3 ELIZA-like program
2.4 Minimum edit distance
2.5 Minimum edit distance
Home Work 63 / 65
Home Work
Exercises
2.1 RE
2.2 RE
2.3 ELIZA-like program
2.4 Minimum edit distance
2.5 Minimum edit distance
2.6 Minimum edit distance
Home Work 63 / 65
Home Work
Exercises
2.1 RE
2.2 RE
2.3 ELIZA-like program
2.4 Minimum edit distance
2.5 Minimum edit distance
2.6 Minimum edit distance
2.7 Minimum cost alignment
Home Work 63 / 65
References I
References 64 / 65
THANK YOU