Text comparison (C # Version)
Zhou yinhui
The text comparison result is as follows:
For example, when abcdefg is compared with a123defghik, it is equivalent to deleting BC, inserting 123, and then inserting hik. The API provided here is used to calculate this.
About thisAlgorithmThe paper can refer to here: http://citeseerx.ist.psu.edu/viewdoc/download? Doi = 10.1.1.4.6927 & rep = rep1 & type = PDF
If you have a hard time, you can refer to this elder brother's analysis:
Http://blog.csdn.net/clariones/archive/2006/11/19/1396880.aspx,
Http://blog.csdn.net/clariones/archive/2006/11/24/1412394.aspx
Someone compiled the algorithm based on his explanation.Java version:
Http://www.blogjava.net/phyeas/archive/2009/01/10/250807.html
I changed itC #And modified some bugs:
Http://files.cnblogs.com/zhouyinhui/TextComparisonSln.zip
In addition, for comparison based on the concept of "text line", refer to here:
Http://www.mathertel.de/Diff/default.aspx