<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>/dev/tty &#187; NLTK</title>
	<atom:link href="http://blog.tty.nl/category/python/nltk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tty.nl</link>
	<description>Notes on Web Development, Computer Programming, and Software Engineering</description>
	<lastBuildDate>Thu, 29 Dec 2011 10:59:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>NLTK&#8217;s dispersion_plot on Mac OS X</title>
		<link>http://blog.tty.nl/2010/02/28/nltks-dispersion_plot-on-mac-os-x/</link>
		<comments>http://blog.tty.nl/2010/02/28/nltks-dispersion_plot-on-mac-os-x/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 11:33:10 +0000</pubDate>
		<dc:creator>Michel Rijnders</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[NLTK]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.tty.nl/?p=344</guid>
		<description><![CDATA[While reading &#8220;Natural Language Processing with Python&#8221; I ran into problems on my Mac with examples that were using the dispersion_plot function: calls to the function returned immediately without displaying anything. Turns out matplotlib&#8216;s back-end wasn&#8217;t configured properly. To fix &#8230; <a href="http://blog.tty.nl/2010/02/28/nltks-dispersion_plot-on-mac-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While reading <a href="http://www.nltk.org/book">&#8220;Natural Language Processing with Python&#8221;</a> I ran into problems on my Mac with examples that were using the <tt>dispersion_plot</tt> function: calls to the function returned immediately without displaying anything.</p>
<p>Turns out <a href="http://matplotlib.sourceforge.net/">matplotlib</a>&#8216;s back-end wasn&#8217;t configured properly. To fix this I had to add a rc file (<tt>matplotlibrc</tt>) to my <tt>~/.matplotlib</tt> directory. The rc file contains the following:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:600px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">backend: TkAgg</div></div>
<p>And, hey presto:<br />
<a href="http://blog.tty.nl/wp-content/uploads/Screen-shot-2010-02-28-at-12.26.21-PM.png"><img src="http://blog.tty.nl/wp-content/uploads/Screen-shot-2010-02-28-at-12.26.21-PM.png" alt="Screen shot 2010-02-28 at 12.26.21 PM" title="Screen shot 2010-02-28 at 12.26.21 PM" width="395" height="316" class="alignnone size-full wp-image-358" /></a></p>
<p>(disclaimer: &#8220;Works on my machine!&#8221;)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tty.nl/2010/02/28/nltks-dispersion_plot-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

