<?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>Luke Loeffler &#187; python</title>
	<atom:link href="http://lukeloeffler.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://lukeloeffler.com</link>
	<description></description>
	<lastBuildDate>Mon, 14 May 2012 04:57:26 +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>Visualizations for new Display</title>
		<link>http://lukeloeffler.com/2010/fiberoptic-visualizations/</link>
		<comments>http://lukeloeffler.com/2010/fiberoptic-visualizations/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 21:22:38 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[puredata]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://lukeloeffler.com/?p=604</guid>
		<description><![CDATA[Over the last couple months I&#8217;ve had the chance to develop a series of &#8220;paintings&#8221; for the fiberoptic tapestry, a new display system developed by artists Ligorano/Reese. It is essentially a hand-woven canvas of optic fibers, each illuminated by an electronically-controlled LED. The result is incredibly beautiful and expressive, producing a painterly effect. I was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lukeloeffler.com/wordpress/wp-content/uploads/2009/12/IMG_1463.JPG"><img class="alignleft size-medium wp-image-608" style="padding-right: .5em" title="IMG_1463" src="http://lukeloeffler.com/wordpress/wp-content/uploads/2009/12/IMG_1463-360x249.jpg" alt="IMG_1463" width="360" height="249" /></a>Over the last couple months I&#8217;ve had the chance to develop a series of &#8220;paintings&#8221; for the <em>fiberoptic tapestry</em>, a new display system developed by artists <a href="http://ligoranoreese.net">Ligorano/Reese</a>. It is essentially a hand-woven canvas of optic fibers, each illuminated by an electronically-controlled LED. The result is incredibly beautiful and expressive, producing a painterly effect. I was mesmerized by the gently-glowing canvases the first time I saw them and was very excited to get the chance to create content for them.</p>
<p>My work has been developing visualizations that utilize the new physical display in different ways. The first visualizes air traffic over four major airports in the US, drawing moving lines to indicate aircraft taking off and landing. The second, entitled <em>Order/Disorder</em>, displayed below aggregates a number of sources for natural disaster information and draws the disasters as &#8220;tears in the fabric&#8221; of the world. Lastly, I am working to create software that reacts to the environment and responds by flashing a series of animations developed by Marshall Reese.</p>
<p>A program in Processing communicates with the hardware and serves as a hub accepting drawing commands from other software via OSC. A number of scripts in Python perform data aggregation, scraping, parsing and animation for the flight tracker. A patch in Pd performs sound analysis and drives the canvases through OSC.</p>
<p><object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" width="640" height="480" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="autoplay" value="false" /><param name="src" value="http://lukeloeffler.com/wordpress/wp-content/uploads/2010/01/order_disorder.mov" /><embed type="video/quicktime" width="640" height="480" src="http://lukeloeffler.com/wordpress/wp-content/uploads/2010/01/order_disorder.mov" autoplay="false"></embed></object></p>
<p><em>&#8220;Order/Disorder</em> is a software visualization of destructive and restorative forces in the world. The software runs on an electronically-controlled tapestry of woven fiberoptic threads created by New York-based artists Ligorano/Reese. Two computer programs, named order and disorder, modify the tapestry throughout the day in response to natural and man-caused events such as earthquakes, biohazards, and aircraft accidents. Order seeks to weave a rainbow-gradated pattern representing peace and wholeness while Disorder seeks to destroy and unravel the tapestry by &#8220;tearing&#8221; the fabric and weaving in aberrant threads.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://lukeloeffler.com/2010/fiberoptic-visualizations/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
<enclosure url="http://lukeloeffler.com/wordpress/wp-content/uploads/2010/01/order_disorder.mov" length="6832221" type="video/quicktime" />
		</item>
		<item>
		<title>Natural Language Processing</title>
		<link>http://lukeloeffler.com/2009/natural-language-processing/</link>
		<comments>http://lukeloeffler.com/2009/natural-language-processing/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 05:07:08 +0000</pubDate>
		<dc:creator>luke</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://lukeloeffler.com/?p=314</guid>
		<description><![CDATA[I have become increasingly interested in tools to perform natural language processing. So much of how we approach and see problems is tied up in the words we find to describe them. I am currently exploring ways to use language to help define and understand problems as well as get out of creative blocks. Below [...]]]></description>
			<content:encoded><![CDATA[<p>I have become increasingly interested in tools to perform natural language processing. So much of how we approach and see problems is tied up in the words we find to describe them. I am currently exploring ways to use language to help define and understand problems as well as get out of creative blocks.</p>
<p>Below are a few useful tools:</p>
<p>Princeton&#8217;s <a href="http://wordnet.princeton.edu/">Wordnet</a> is a massive linguistic database containing not just definitions, but how words are related to each other.</p>
<p>The Python <a href="http://www.nltk.org/">Natural Language Toolkit</a>, which provides tools for parsing and understanding natural language semantics.</p>
<p>The Carnegie Mellon <a href="http://www.speech.cs.cmu.edu/cgi-bin/cmudict">Pronouncing Dictionary</a>, which breaks words down into their phonemes, providing information regarding pronouncing, rhyming, and syllable counts.</p>
<p>Having found no simple resource to provide syllable counts for common words, I want to share a quick solution I wrote in Python, which uses the CMU dictionary. Simply download the dictionary to the same directory as this script, naming it cmu_pron.txt.</p>
<pre>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">f = open("cmu_pron.txt")</div>

f = open("cmu_pron.txt")
lines = f.readlines()
f.close()
words = {}

for line in lines:
	pieces = line.split()
	if pieces[0] == ";;;":
		continue
	words[pieces[0]] = pieces[1:]

def num_syllables(word):
	global words
	key = word.upper()
	plist = words[key]
	return len(filter(lambda c: c in ("0","1","2"),"".join(plist)))

print "alphabet: %s" % num_syllables("alphabet")</pre>
<p>The result for alphabet is indeed 3. There are probably more efficient ways to do this, but it gets the job done.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukeloeffler.com/2009/natural-language-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

