Use the minimum distance algorithm to show how many editing steps it will take for the word ‘intenti
To find the number of editing steps required to transform the word 'intenti' into the word 'intention' using the minimum distance algorithm (also known as the Levenshtein distance algorithm), we can follow a similar approach as before, but only consider the substring 'intenti' of the longer word 'intention'. Here's how it's done:
lua
'' i n t e n t i ------------------------------- '' | 0 | 1 | 2 | 3 | 4 | 5 | 6 | ------------------------------- i | 1 | 0 | 1 | 2 | 3 | 4 | 5 | ------------------------------- n | 2 | 1 | 0 | 1 | 2 | 3 | 4 | ------------------------------- t | 3 | 2 | 1 | 0 | 1 | 2 | 3 | ------------------------------- e | 4 | 3 | 2 | 1 |
Tags
Qualification
Course
Department
Stream
Subject