<?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: Stemming with Haskell reloaded</title>
	<atom:link href="http://blog.tupil.com/stemming-with-haskell-reloaded/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tupil.com/stemming-with-haskell-reloaded/</link>
	<description>(Get up early, code often)</description>
	<lastBuildDate>Sat, 28 Aug 2010 04:45:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Eelco Lempsink</title>
		<link>http://blog.tupil.com/stemming-with-haskell-reloaded/comment-page-1/#comment-143</link>
		<dc:creator>Eelco Lempsink</dc:creator>
		<pubDate>Thu, 24 Jul 2008 11:42:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tupil.com/?p=23#comment-143</guid>
		<description>ForgeDestiny, that&#039;s valuable feedback :) You&#039;re right, it&#039;s pretty readable on my screen, but we should probably make it a bit brighter (I think the comments are much better readable already)</description>
		<content:encoded><![CDATA[<p>ForgeDestiny, that&#8217;s valuable feedback :) You&#8217;re right, it&#8217;s pretty readable on my screen, but we should probably make it a bit brighter (I think the comments are much better readable already)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ForgeDestiny</title>
		<link>http://blog.tupil.com/stemming-with-haskell-reloaded/comment-page-1/#comment-142</link>
		<dc:creator>ForgeDestiny</dc:creator>
		<pubDate>Thu, 24 Jul 2008 10:43:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tupil.com/?p=23#comment-142</guid>
		<description>The Haskell code, me like. But the light gray text on black background made my eyes itch....and quiver briefly. I didn&#039;t read any of it.</description>
		<content:encoded><![CDATA[<p>The Haskell code, me like. But the light gray text on black background made my eyes itch&#8230;.and quiver briefly. I didn&#8217;t read any of it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Holden Karau</title>
		<link>http://blog.tupil.com/stemming-with-haskell-reloaded/comment-page-1/#comment-125</link>
		<dc:creator>Holden Karau</dc:creator>
		<pubDate>Mon, 21 Jul 2008 20:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tupil.com/?p=23#comment-125</guid>
		<description>yays! I was looking for a clean stemming library. Thanks :)</description>
		<content:encoded><![CDATA[<p>yays! I was looking for a clean stemming library. Thanks :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eelco Lempsink</title>
		<link>http://blog.tupil.com/stemming-with-haskell-reloaded/comment-page-1/#comment-119</link>
		<dc:creator>Eelco Lempsink</dc:creator>
		<pubDate>Mon, 21 Jul 2008 06:35:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tupil.com/?p=23#comment-119</guid>
		<description>That&#039;s a great tip, thanks Twan.  I wasn&#039;t aware of &lt;code&gt;ForeignPtr&lt;/code&gt; so I seem to have replicated its behavior. 

I think that it will even make &lt;code&gt;stemWords&lt;/code&gt; unnecessary, since a simple &lt;code&gt;map stem&lt;/code&gt; will be just as efficient.

The C library claims to be thread-safe (and I&#039;ll take their word for it), so exporting multiple stemmer objects might also work very nicely.

Thanks again :)</description>
		<content:encoded><![CDATA[<p>That&#8217;s a great tip, thanks Twan.  I wasn&#8217;t aware of <code>ForeignPtr</code> so I seem to have replicated its behavior. </p>
<p>I think that it will even make <code>stemWords</code> unnecessary, since a simple <code>map stem</code> will be just as efficient.</p>
<p>The C library claims to be thread-safe (and I&#8217;ll take their word for it), so exporting multiple stemmer objects might also work very nicely.</p>
<p>Thanks again :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twan van Laarhoven</title>
		<link>http://blog.tupil.com/stemming-with-haskell-reloaded/comment-page-1/#comment-115</link>
		<dc:creator>Twan van Laarhoven</dc:creator>
		<pubDate>Sun, 20 Jul 2008 20:09:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tupil.com/?p=23#comment-115</guid>
		<description>Have you considered using a ForeignPtr to hold the stemmer? In that case you no longer need to delete manually, you use a finalizer instead. The interface can then be simply:
&lt;pre lang=&quot;haskell&quot;&gt;
newtype Stemmer = ...
stemmer :: Algorithm -&gt; Stemmer
stemWith :: Stemmer -&gt; String -&gt; String
stemWith = C.stem
&lt;/pre&gt;
The &lt;code&gt;stem&lt;/code&gt; and &lt;code&gt;stemWords&lt;/code&gt; can then be implemented trivially as
&lt;pre lang=&quot;haskell&quot;&gt;
stem = stemWith . stemmer
stemWords = map stemWith . stemmer
&lt;/pre&gt;

If the C library is threadsafe and the stemmer objects are not too large, you could even eliminate the &lt;code&gt;Algorithm&lt;/code&gt; type from the interface altogether, and just export multiple &lt;code&gt;Stemmer&lt;/code&gt; objects. These will then be intialized when they are first used.</description>
		<content:encoded><![CDATA[<p>Have you considered using a ForeignPtr to hold the stemmer? In that case you no longer need to delete manually, you use a finalizer instead. The interface can then be simply:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">newtype</span> Stemmer <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #339933; font-weight: bold;">...</span>
stemmer <span style="color: #339933; font-weight: bold;">::</span> Algorithm <span style="color: #339933; font-weight: bold;">-&gt;</span> Stemmer
stemWith <span style="color: #339933; font-weight: bold;">::</span> Stemmer <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #cccc00; font-weight: bold;">String</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #cccc00; font-weight: bold;">String</span>
stemWith <span style="color: #339933; font-weight: bold;">=</span> C<span style="color: #339933; font-weight: bold;">.</span>stem</pre></div></div>

<p>The <code>stem</code> and <code>stemWords</code> can then be implemented trivially as</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">stem <span style="color: #339933; font-weight: bold;">=</span> stemWith <span style="color: #339933; font-weight: bold;">.</span> stemmer
stemWords <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">map</span> stemWith <span style="color: #339933; font-weight: bold;">.</span> stemmer</pre></div></div>

<p>If the C library is threadsafe and the stemmer objects are not too large, you could even eliminate the <code>Algorithm</code> type from the interface altogether, and just export multiple <code>Stemmer</code> objects. These will then be intialized when they are first used.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
