---
title: "字符串相似度匹配算法【转载】"
author: "ghost_face"
date: "2013-09-26T17:21:54Z"
tags: []
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2013-09-26T17:21:51Z"
id: 1947623
url: "https://ghost-face.iteye.com/blog/1947623"
---

原文链接：[http://www.cnblogs.com/grenet/archive/2010/06/04/1751147.html](http://www.cnblogs.com/grenet/archive/2010/06/04/1751147.html)

 

文章大致内容：

1，计算两个字符串的Levenshtein距离。

      Levenshtein距离：又叫做编辑距离，指两个字符串A和B中，A到B（或者B到A）的转变至少需要编辑的次         数。编辑操作包括：添加、删除、替换。

2，计算两个字符串的LCS（Longest Common Subsequence）长度

3，根据1,2，来确定最后的相似度。