<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Damerau-Levenshtein Distance in Python</title>
	<atom:link href="http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/</link>
	<description>Keeping track of what I do</description>
	<lastBuildDate>Fri, 30 Jul 2010 09:05:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: numerix</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-34980</link>
		<dc:creator>numerix</dc:creator>
		<pubDate>Thu, 27 May 2010 13:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-34980</guid>
		<description>Thanks Michael, for pointing that out. I was not aware of that difference!</description>
		<content:encoded><![CDATA[<p>Thanks Michael, for pointing that out. I was not aware of that difference!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-34876</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 25 May 2010 02:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-34876</guid>
		<description>Oh, and to Guy, yes, there&#039;s a problem in the algorithm - try it on &quot;AB&quot; and &quot;BA&quot;. It should give one but instead says two. I didn&#039;t figure out why that was.</description>
		<content:encoded><![CDATA[<p>Oh, and to Guy, yes, there&#8217;s a problem in the algorithm &#8211; try it on &#8220;AB&#8221; and &#8220;BA&#8221;. It should give one but instead says two. I didn&#8217;t figure out why that was.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-34875</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 25 May 2010 02:49:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-34875</guid>
		<description>numerix, note the difference between Levenshtein Distance and Damerau-Levenshtein distance. The latter allows transpositions. The former is what is described in the SPOJ problem, and in the calculator you link to.

Both algorithms give the correct answer for that pair: delete H, U, R, replace B with K, transpose O and H, replace P with Z. Six steps.</description>
		<content:encoded><![CDATA[<p>numerix, note the difference between Levenshtein Distance and Damerau-Levenshtein distance. The latter allows transpositions. The former is what is described in the SPOJ problem, and in the calculator you link to.</p>
<p>Both algorithms give the correct answer for that pair: delete H, U, R, replace B with K, transpose O and H, replace P with Z. Six steps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: numerix</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-34839</link>
		<dc:creator>numerix</dc:creator>
		<pubDate>Mon, 24 May 2010 11:53:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-34839</guid>
		<description>Yes, the algorithm shown above is not correct, but the other one J. Reagle gave a link to, is also incorrect.
Example: The Levenshtein-Distance between HURQBOHP and QKHOZ is 7, but both algorithms give 6 as result.
You can check it e.g. here: http://www-igm.univ-mlv.fr/~lecroq/seqcomp/node2.html

It is true, that the second algorithm is (by far!) faster than the one shown above (I checked it with two strings of length 2000 and it was about 100 times faster), but both algorithms are unefficient implementations. My own Python implementation is about 1000 times faster than the one above. I won&#039;t show the code, because I used it for SPOJ problem EDIST (https://www.spoj.pl/problems/EDIST/). You can use that problem to check correctness and performance of Levenshtein-algorithms.</description>
		<content:encoded><![CDATA[<p>Yes, the algorithm shown above is not correct, but the other one J. Reagle gave a link to, is also incorrect.<br />
Example: The Levenshtein-Distance between HURQBOHP and QKHOZ is 7, but both algorithms give 6 as result.<br />
You can check it e.g. here: <a href="http://www-igm.univ-mlv.fr/~lecroq/seqcomp/node2.html" rel="nofollow">http://www-igm.univ-mlv.fr/~lecroq/seqcomp/node2.html</a></p>
<p>It is true, that the second algorithm is (by far!) faster than the one shown above (I checked it with two strings of length 2000 and it was about 100 times faster), but both algorithms are unefficient implementations. My own Python implementation is about 1000 times faster than the one above. I won&#8217;t show the code, because I used it for SPOJ problem EDIST (<a href="https://www.spoj.pl/problems/EDIST/" rel="nofollow">https://www.spoj.pl/problems/EDIST/</a>). You can use that problem to check correctness and performance of Levenshtein-algorithms.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Reagle</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-23991</link>
		<dc:creator>Joseph Reagle</dc:creator>
		<pubDate>Fri, 09 Oct 2009 14:47:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-23991</guid>
		<description>Thanks for this, however I found another which is faster. http://mwh.geek.nz/2009/04/26/python-damerau-levenshtein-distance/</description>
		<content:encoded><![CDATA[<p>Thanks for this, however I found another which is faster. <a href="http://mwh.geek.nz/2009/04/26/python-damerau-levenshtein-distance/" rel="nofollow">http://mwh.geek.nz/2009/04/26/python-damerau-levenshtein-distance/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-17163</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Tue, 17 Mar 2009 12:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-17163</guid>
		<description>@Sloan, I&#039;ve just check the English wikipedia article about Damerau-Levenshtein distance (and the talk page) and didn&#039;t see anyone referring to a mistake in my implementation.

Can you please point out the error, if it really exists, so I can correct it?</description>
		<content:encoded><![CDATA[<p>@Sloan, I&#8217;ve just check the English wikipedia article about Damerau-Levenshtein distance (and the talk page) and didn&#8217;t see anyone referring to a mistake in my implementation.</p>
<p>Can you please point out the error, if it really exists, so I can correct it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sloan</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-17162</link>
		<dc:creator>Sloan</dc:creator>
		<pubDate>Tue, 17 Mar 2009 12:18:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-17162</guid>
		<description>incorrect algorithm
refer to wikipedia
they say that whatever you have written is worng</description>
		<content:encoded><![CDATA[<p>incorrect algorithm<br />
refer to wikipedia<br />
they say that whatever you have written is worng</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-6192</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Wed, 17 Dec 2008 11:06:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-6192</guid>
		<description>אני משתמש בתוסף בשם
wp-syntax
הוא תומך בהרבה שפות תכנות והוא נוח לשימוש</description>
		<content:encoded><![CDATA[<p>אני משתמש בתוסף בשם<br />
wp-syntax<br />
הוא תומך בהרבה שפות תכנות והוא נוח לשימוש</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: אריאל</title>
		<link>http://www.guyrutenberg.com/2008/12/15/damerau-levenshtein-distance-in-python/comment-page-1/#comment-6191</link>
		<dc:creator>אריאל</dc:creator>
		<pubDate>Wed, 17 Dec 2008 10:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=182#comment-6191</guid>
		<description>אני אהיה אוף-טופיק לגמרי, כיצד עיצבת את מראה הקוד הנ&quot;ל, האם אתה משתמש בתוסף כלשהו שעושה את העבודה?</description>
		<content:encoded><![CDATA[<p>אני אהיה אוף-טופיק לגמרי, כיצד עיצבת את מראה הקוד הנ&#8221;ל, האם אתה משתמש בתוסף כלשהו שעושה את העבודה?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.403 seconds -->
