<?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: How to Write a Spelling Corrector in Ruby</title>
	<atom:link href="http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/</link>
	<description></description>
	<lastBuildDate>Sun, 25 Dec 2011 09:28:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Spellbound &#171; newlisper</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-20870</link>
		<dc:creator>Spellbound &#171; newlisper</dc:creator>
		<pubDate>Tue, 08 Feb 2011 14:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-20870</guid>
		<description>[...] Brian Adkins [...]</description>
		<content:encoded><![CDATA[<p>[...] Brian Adkins [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alejandrodumas</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-20119</link>
		<dc:creator>alejandrodumas</dc:creator>
		<pubDate>Wed, 19 Jan 2011 13:17:59 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-20119</guid>
		<description>thanks for the ruby version, remember that in the
train method you don&#039;t need to put return model as in
other languages.</description>
		<content:encoded><![CDATA[<p>thanks for the ruby version, remember that in the<br />
train method you don&#8217;t need to put return model as in<br />
other languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SpellingBee gem released &#124; Binary Doodles</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-19501</link>
		<dc:creator>SpellingBee gem released &#124; Binary Doodles</dc:creator>
		<pubDate>Sat, 01 Jan 2011 07:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-19501</guid>
		<description>[...] &#8211; Brian Adkins&#8217; article How to Write a Spelling Corrector in Ruby helped a lot when I was trying to translate the python [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8211; Brian Adkins&#8217; article How to Write a Spelling Corrector in Ruby helped a lot when I was trying to translate the python [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Dvorkin</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-19119</link>
		<dc:creator>Michael Dvorkin</dc:creator>
		<pubDate>Fri, 24 Dec 2010 05:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-19119</guid>
		<description>result.any? &amp;&amp; result

Also, result = words.find_all {&#124;w&#124; NWORDS.has_key?(w) } can be rewritten as:

result = words &amp; HWORDS.keys

which is faster and removes duplicates.</description>
		<content:encoded><![CDATA[<p>result.any? &amp;&amp; result</p>
<p>Also, result = words.find_all {|w| NWORDS.has_key?(w) } can be rewritten as:</p>
<p>result = words &amp; HWORDS.keys</p>
<p>which is faster and removes duplicates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Wilden</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-19103</link>
		<dc:creator>Mark Wilden</dc:creator>
		<pubDate>Thu, 23 Dec 2010 22:03:25 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-19103</guid>
		<description>I think this is a bit more Rubyish:

!result.empty? &amp;&amp; result</description>
		<content:encoded><![CDATA[<p>I think this is a bit more Rubyish:</p>
<p>!result.empty? &amp;&amp; result</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: McGee</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-16187</link>
		<dc:creator>McGee</dc:creator>
		<pubDate>Fri, 17 Sep 2010 00:35:31 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-16187</guid>
		<description>for the alteration (and insertion) you could also use this syntax, for consistency:

alteration = (0...n).collect { &#124;i&#124; (0...26).collect { &#124;l&#124; word[0...i] + LETTERS[l].chr+word[i+1..-1] } }.flatten</description>
		<content:encoded><![CDATA[<p>for the alteration (and insertion) you could also use this syntax, for consistency:</p>
<p>alteration = (0&#8230;n).collect { |i| (0&#8230;26).collect { |l| word[0...i] + LETTERS[l].chr+word[i+1..-1] } }.flatten</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Pereda</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-11050</link>
		<dc:creator>Ray Pereda</dc:creator>
		<pubDate>Tue, 26 Jan 2010 22:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-11050</guid>
		<description>I know both Python and Ruby, and IMHO your Ruby edition is much more readable.  As pretty as a typical elementary number theory theorem and proof.</description>
		<content:encoded><![CDATA[<p>I know both Python and Ruby, and IMHO your Ruby edition is much more readable.  As pretty as a typical elementary number theory theorem and proof.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Adkins</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-2772</link>
		<dc:creator>Brian Adkins</dc:creator>
		<pubDate>Sun, 12 Apr 2009 21:57:43 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-2772</guid>
		<description>@Antonio - sure, as long as the copyright is retained.</description>
		<content:encoded><![CDATA[<p>@Antonio &#8211; sure, as long as the copyright is retained.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antonio Cangiano</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-2769</link>
		<dc:creator>Antonio Cangiano</dc:creator>
		<pubDate>Sun, 12 Apr 2009 15:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-2769</guid>
		<description>Brian, is it okay with you if I include your code in the Ruby Benchmark Suite? It&#039;s an open source project that&#039;s released under the MIT license. Your file would therefore be released as MIT as well, carry a copyright line with your name, and a link back to this post.</description>
		<content:encoded><![CDATA[<p>Brian, is it okay with you if I include your code in the Ruby Benchmark Suite? It&#8217;s an open source project that&#8217;s released under the MIT license. Your file would therefore be released as MIT as well, carry a copyright line with your name, and a link back to this post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2009-02-06 &#171; Brent Sordyl&#8217;s Blog</title>
		<link>http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/comment-page-1/#comment-1324</link>
		<dc:creator>links for 2009-02-06 &#171; Brent Sordyl&#8217;s Blog</dc:creator>
		<pubDate>Fri, 06 Feb 2009 14:00:44 +0000</pubDate>
		<guid isPermaLink="false">http://lojic.com/blog/2008/09/04/how-to-write-a-spelling-corrector-in-ruby/#comment-1324</guid>
		<description>[...] How to Write a Spelling Corrector in Ruby Peter Norvig wrote a simple spelling corrector in 20 lines of Python 2.5, so I thought I’d see what it looks like in Ruby. Here are some areas I’m not pleased with: (tags: ruby programming) [...]</description>
		<content:encoded><![CDATA[<p>[...] How to Write a Spelling Corrector in Ruby Peter Norvig wrote a simple spelling corrector in 20 lines of Python 2.5, so I thought I’d see what it looks like in Ruby. Here are some areas I’m not pleased with: (tags: ruby programming) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

