String similarity, longest common subsequence and shortest edit scripts are the triplets of problem that related to each other. There are different algorithms exist to generate edit script by solving longest common subsequence problem. This paper proposes an algorithm that uses string similarity problem to generate shortest edit script. For this we use the famous Levenshtein distance algorithm, which computes a numerical value that represents similarity between the strings from 0 to n, where n is the length of longest input string, and produce the shortest edit script which contains instructions of Insert, Delete and Substitute.
翻译:字符串相似性、 最长的共同子序列和最短的编辑脚本是三重问题, 彼此相关。 存在不同的算法, 通过解决最长的共同子序列问题来生成编辑脚本。 本文建议使用字符串相似性问题来生成最短的编辑脚本的算法。 为此, 我们使用著名的 Levenshtein 距离算法, 该算法代表字符串从 0 到 n 之间的相似性, 其中 n 是最长的输入字符串的长度, 并生成最短的编辑脚本, 其中含有插入、 删除和替代指令 。