<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Finite Brainstorms</title>
	<atom:link href="http://zuse.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://zuse.wordpress.com</link>
	<description>Experiments in Software</description>
	<lastBuildDate>Sat, 28 Oct 2006 04:40:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='zuse.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Finite Brainstorms</title>
		<link>http://zuse.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://zuse.wordpress.com/osd.xml" title="Finite Brainstorms" />
	<atom:link rel='hub' href='http://zuse.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Part-of-speech Colorizer (Python)</title>
		<link>http://zuse.wordpress.com/2006/10/28/word-part-of-speech-colorizer/</link>
		<comments>http://zuse.wordpress.com/2006/10/28/word-part-of-speech-colorizer/#comments</comments>
		<pubDate>Sat, 28 Oct 2006 04:33:18 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://zuse.wordpress.com/2006/10/28/word-part-of-speech-colorizer/</guid>
		<description><![CDATA[  This is a simple little program that converts English text to a table of colors, in which each color represents the part of speech (POS) for the corresponding word.  The table is output in an HTML page, as shown in the example below. This text: TOUCH ACTIVATES VISUAL AREA OF BRAIN When a person [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zuse.wordpress.com&amp;blog=399867&amp;post=22&amp;subd=zuse&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>  This is a simple little program that converts English text to a table of colors, in which each color represents the part of speech (POS) for the corresponding word.  The table is output in an HTML page, as shown in the example below.</p>
<p>This text:</p>
<p><em>TOUCH ACTIVATES VISUAL AREA OF BRAIN When a person can’t see, even for a short time, visual areas in the brain begin responding to touch, showing that the brain starts to “see” the world through the fingers instead of the eyes. Researchers from Harvard Medical School performed a dramatic experiment to show just how quickly the brain adapts. They blindfolded people with normal vision for just five days to simulate total blindness. Brain scans of these people showed that areas of the brain devoted to the eyes started responding to touch. Scientists believe that connections between touch and sight are always there, waiting to be unmasked when injury occurs. These findings were presented this weekend at the annual Society for Neuroscience meeting in Atlanta.</em></p>
<p><em>BRAIN TAPS TOES TO MUSIC Your brain is tapping its toes along to music even if your feet aren’t moving, new research from McGill University shows. Scientists performed brain scans on people listening to music, and they found that the brain areas that control movements like toe tapping were active even when people just listened to the music. In fact, the rhythm alone was enough to trigger the brain activation. Researchers think the complex rhythms in music activate the brain and that this activation could be the reason we all have an irresistible urge to dance when our favorite songs come on. These findings were presented this weekend at the annual Society for Neuroscience meeting in Atlanta. </em></p>
<p><em>NEW GENDER GENE IDENTIFIED Mutations in a gene called RSPO1 can change girls to boys, researchers in Italy find. The new study, published in the journal Nature Genetics, is based on an Italian family in which four brothers are genetically female, having two X chromosomes, but they developed into boys anyway. Such sex changes are extremely rare, and usually they happen because the typical gene determining maleness migrates from the Y chromosome onto an X chromosome. This is the first time that scientists have found an example of human males who are male without the usual gene that determines male development. </em></p>
<p><em>STAT is a brief look at the latest medical research and is compiled by Joanna Schaffhausen, who holds a doctorate in behavioral neuroscience. She works in the ABC News Medical Unit, evaluating medical studies, abstracts and news releases.<br />
</em> </p>
<p>Becomes:</p>
<table border="1" width="400" cellSpacing="0">
<tr>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
</tr>
<tr>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
</tr>
<tr>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
</tr>
<tr>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
</tr>
<tr>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
</tr>
<tr>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
</tr>
<tr>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
</tr>
<tr>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
</tr>
<tr>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
</tr>
<tr>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
</tr>
<tr>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#0000ff">  </td>
<td bgColor="#ffa500">  </td>
<td bgColor="#ff0000">  </td>
<td bgColor="#00ff00">  </td>
</tr>
</table>
<p>  The part of speech used for each word is determined by a lookup in a POS database, available at <a href="http://wordlist.sourceforge.net/">http://wordlist.sourceforge.net/</a>.  Many words have more than one possible use, and in these cases the lookup procedure defaults to the first returned POS.</p>
<p>  The program can be launched from the command line, but a basic web server is also provided, to make the colorization slightly interactive.  To run colorization from the command line:</p>
<p><em>python filecolorizer.py -s  -t [target file]</em></p>
<p>To run the webserver:</p>
<p><em>python colorizerserver.py</em></p>
<p>Here is the zipped source.  The zip includes the pos.txt database file, which accounts for most of the ~1100K.  Note that the code uses the optparse module, so Python 2.3 and above is required for the command line launcher to work.<br />
<a href="http://www.box.net/public/q5osnhj6dq">Source Code</a></p>
<p><strong>References<br />
</strong><a href="http://wordlist.sourceforge.net/">POS Database</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/zuse.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/zuse.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zuse.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zuse.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zuse.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zuse.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zuse.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zuse.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zuse.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zuse.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zuse.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zuse.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zuse.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zuse.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zuse.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zuse.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zuse.wordpress.com&amp;blog=399867&amp;post=22&amp;subd=zuse&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zuse.wordpress.com/2006/10/28/word-part-of-speech-colorizer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60327919047ac25c2bae1a648fa7ab4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gb</media:title>
		</media:content>
	</item>
		<item>
		<title>Cell Network Simulation (ANSI C)</title>
		<link>http://zuse.wordpress.com/2006/10/26/processor-network-ansi-c/</link>
		<comments>http://zuse.wordpress.com/2006/10/26/processor-network-ansi-c/#comments</comments>
		<pubDate>Thu, 26 Oct 2006 15:03:47 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://zuse.wordpress.com/2006/10/26/processor-network-ansi-c/</guid>
		<description><![CDATA[Introduction   The code presented here is a rough draft of a multi-processor network simulator/testbed.  The network contains discrete processors, called cells, which contain small programs, local data, and input queues.  One design goal was to use only ANSI C, and to require no external libraries.   In a single network cycle, each cell executes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zuse.wordpress.com&amp;blog=399867&amp;post=18&amp;subd=zuse&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction<br />
</strong>  The code presented here is a rough draft of a multi-processor network simulator/testbed.  The network contains discrete processors, called cells, which contain small programs, local data, and input queues.  One design goal was to use only ANSI C, and to require no external libraries.<br />
  In a single network cycle, each cell executes its program and broadcasts its data to other cells.  First, the network prompts each cell to execute its program.  When execution is complete, the cell specifies which cells are the targets of its output data.  The network then fills the input queues of the target cells with the data, to be available for processing in the next network cycle.<br />
   Cell programs are written in Scheme, via an instance of the remarkable TinyScheme interpreter embedded in the simulator.  The power and flexibility of Scheme allows for a wide range of applications of the network.</p>
<p><strong>Cell Details<br />
</strong>  The following table lists and explains each cell field. </p>
<table border="1" cellPadding="0" cellSpacing="0" style="border-collapse:collapse;border:medium none;" class="MsoNormalTable">
<tr>
<td width="115" vAlign="top" style="background:#0b3d91;width:1.2in;border:windowtext 1pt solid;padding:0 5.4pt;">
<p style="line-height:15.6pt;margin:0;" class="MsoNormal"><font size="3"><font face="Times New Roman"><strong><span style="color:white;">Field</span></strong><span style="color:white;"></span></font></font></p>
</td>
<td width="348" vAlign="top" style="border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;border-left-color:#d4d0c8;background:#0b3d91;width:261pt;border-bottom:windowtext 1pt solid;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><strong><span style="color:white;">Meaning</span></strong><span style="font-size:7.5pt;color:white;font-family:Verdana;"></span></font></font></td>
</tr>
<tr>
<td width="115" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:1.2in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>name</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="348" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:261pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Name of cell, used to identify cell in broadcast lists<span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
</tr>
<tr>
<td width="115" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:1.2in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>program</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="348" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:261pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Scheme source code to execute each net cycle<span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
</tr>
<tr>
<td width="115" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:1.2in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>broadcastList</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="348" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:261pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Array of two broadcast lists, to specify where output should be sent<span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
</tr>
<tr>
<td width="115" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:1.2in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>inputQueue</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="348" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:261pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Incoming data from other cells<span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
</tr>
<tr>
<td width="115" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:1.2in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>localRegister</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="348" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:261pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Local persistent storage, a record with one integer and one string field<span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
</tr>
</table>
<p>  The following table lists all the Scheme variables that are written to or read from the Scheme environment during the execution of each cell program.  The read/write column indicates if the variable is written or read.</p>
<table border="0" cellPadding="0" cellSpacing="0" style="border-collapse:collapse;" class="MsoNormalTable">
<tr>
<td width="127" vAlign="top" style="background:#0b3d91;width:95.4pt;border:windowtext 1pt solid;padding:0 5.4pt;">
<p style="line-height:15.6pt;margin:0;" class="MsoNormal"><font size="3"><font face="Times New Roman"><strong><span style="color:white;">Variable Name</span></strong><span style="color:white;"></span></font></font></p>
</td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;border-left-color:#d4d0c8;background:#0b3d91;width:207pt;border-bottom:windowtext 1pt solid;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><strong><span style="color:white;">Meaning</span></strong><span style="color:white;"></span></font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-top:windowtext 1pt solid;border-left-color:#d4d0c8;background:#0b3d91;width:1in;border-bottom:windowtext 1pt solid;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><strong><span style="color:white;">Read/Write</span></strong><span style="color:white;"></span></font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>regtxt</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Current string value in the cell register</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Both</font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>regnum</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Current numeric value in the cell register</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Both</font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>redflag</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Indicates if output should be sent to red targets</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Read</font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>blueflag</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Indicates if output should be sent to blue targets</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Read</font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>bctxt</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Output string value</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Read</font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>bcnum</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Output numeric value</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Read</font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>qnumlist</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">List of numeric values of the data in the cell input queue</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Write</font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>qtxtlist</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">List of the string values of the data in the cell input queue</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Write</font></font></td>
</tr>
<tr>
<td width="127" vAlign="top" style="border-right:windowtext 1pt solid;border-left:windowtext 1pt solid;width:95.4pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman"><em>qlistlen</em><span style="font-size:7.5pt;font-family:Verdana;"></span></font></font></td>
<td width="276" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:207pt;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Size of the input queue</font></font></td>
<td width="96" vAlign="top" style="border-right:windowtext 1pt solid;border-left-color:#d4d0c8;width:1in;border-top-color:#d4d0c8;border-bottom:windowtext 1pt solid;background-color:transparent;padding:0 5.4pt;"><font size="3"><font face="Times New Roman">Write</font></font></td>
</tr>
</table>
<p><strong>Execution</strong><br />
  The simulator is launched with this command:</p>
<p><em>ppsim -netfile=[netfile] -cycles=[cycles]</em></p>
<p>The netfile is an XML config file that defines the structure, including the source code for each cell. It is parsed via a simple ANSI C XML parser written by Martyn Brown.  Once parsing is complete, the simulator executes the specified number of network cycles.  An optional argument, netdump, enables printing the cell states after each cycle.<br />
 <br />
<strong>Example</strong><br />
  Perhaps the most literal use of the network is to model digital logic circuits, in which each cell models the behavior of a single logic gate.  Consider a simple binary half adder  that adds two bits:</p>
<p style="text-align:center;"><img src="https://zuse.files.wordpress.com/2006/10/halfadd1.jpg?w=450" alt="halfadd1.jpg" /></p>
<p> A diagram of an equivalent network is shown below.  Besides two cells that model the two gates, the network has two cells to drive test data (the green number) into the network, and two cells to act as the two input pins.  At first glance, the code in the gate cells looks excessively large, but much of the code is relatively trivial overhead code, such as creating local variables to simplify input data values.</p>
<p style="text-align:center;"><img src="https://zuse.files.wordpress.com/2006/10/half_adder_net1.png?w=450" alt="half_adder_net1.png" /></p>
<p>Here is the XML file that defines the example network:<br />
<a href="http://www.box.net/public/ddvhgx9vre">half_adder.xml</a></p>
<p>The zipped source code:<br />
<a href="http://www.box.net/public/qiq791h5i4">Source Code</a><br />
 <br />
<strong>References<br />
</strong><a href="http://tinyscheme.sourceforge.net/">TinyScheme</a><br />
<a href="http://www.codeguru.com/cpp/data/data-misc/xml/article.php/c4549/">McbXML</a><br />
<a href="http://www.rwc.uc.edu/koehler/comath/25.html">http://www.rwc.uc.edu/koehler/comath/25.html</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/zuse.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/zuse.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zuse.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zuse.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zuse.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zuse.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zuse.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zuse.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zuse.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zuse.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zuse.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zuse.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zuse.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zuse.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zuse.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zuse.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zuse.wordpress.com&amp;blog=399867&amp;post=18&amp;subd=zuse&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zuse.wordpress.com/2006/10/26/processor-network-ansi-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60327919047ac25c2bae1a648fa7ab4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gb</media:title>
		</media:content>

		<media:content url="https://zuse.files.wordpress.com/2006/10/halfadd1.jpg" medium="image">
			<media:title type="html">halfadd1.jpg</media:title>
		</media:content>

		<media:content url="https://zuse.files.wordpress.com/2006/10/half_adder_net1.png" medium="image">
			<media:title type="html">half_adder_net1.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Chinese-English Dictionary (Lisp)</title>
		<link>http://zuse.wordpress.com/2006/10/08/chinese-english-dictionary-lisp/</link>
		<comments>http://zuse.wordpress.com/2006/10/08/chinese-english-dictionary-lisp/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 19:55:57 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://zuse.wordpress.com/2006/10/08/chinese-english-dictionary-lisp/</guid>
		<description><![CDATA[  This is a rudimentary Chinese-English dictionary written in Common Lisp. It can translate words in both directions, and also displays Chinese characters (hanzi) as ASCII drawings. Simplified characters instead of traditional characters are used for visual clarity, since the ASCII drawings are quite blocky.   The code in this program uses the trusty CEDICT [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zuse.wordpress.com&amp;blog=399867&amp;post=4&amp;subd=zuse&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>  This is a rudimentary Chinese-English dictionary written in Common Lisp. It can translate words in both directions, and also displays Chinese characters (hanzi) as ASCII drawings. Simplified characters instead of traditional characters are used for visual clarity, since the ASCII drawings are quite blocky.</p>
<p>  The code in this program uses the trusty CEDICT dictionary file for dictionary data, and determines the ASCII representation of hanzi glyphs from a Chinese font BDF file.  All data is loaded into RAM at startup.  The code uses a &#8216;#&#8217; character for the ASCII drawing &#8216;pixels&#8217;.  On DOS/Windows machines, the DOS character 178 looks much better; a sample screenshot is below.</p>
<p align="center"> <a href="http://zuse.files.wordpress.com/2006/10/screenshot-cidian.png" title="Sample Screenshot of Hanzi with DOS-only Character"><img src="http://zuse.files.wordpress.com/2006/10/screenshot-cidian.thumbnail.png?w=450" alt="Sample Screenshot of Hanzi with DOS-only Character" /></a></p>
<p>  This program was written as a fun initial experiment with the Lisp language, and violates a number of standard Lisp style guidelines.  The greatest violation is the use of end brace comments; the braces are commented because the editor used (TextPad) is not a Lisp development powerhouse (c.f. Emacs in Lisp mode), and the comments are a great help.</p>
<p>To execute:<br />
 Open a Common Lisp environment.<br />
 <em>(load &#8220;starter.lisp&#8221;)<br />
 (start)</em></p>
<p>Here is output from a sample run. <br />
<a href="http://zuse.files.wordpress.com/2006/10/lispoutput.txt" title="Sample Output">Sample Output</a></p>
<p>Here is a link to the zipped source.  It is in standard Common Lisp, and has been tested in several different Lisp interpreters.<br />
<a href="http://www.box.net/public/hs78l7crpl">Source Code</a></p>
<p><!--RiteCounter--><strong>References<br />
</strong><a href="http://webcvs.freedesktop.org/xorg/font/isas-misc/gb16fs.bdf?view=log">CEDICT<br />
gb16fs.bdf</a><br />
<a href="http://www.cs.utexas.edu/users/novak/gclwin.html">Gnu Lisp Common Lisp for Windows</a><br />
<a href="http://www.ritecounter.com"><img border="0" src="http://www.ritecounter.com/scripts/htmlc.php?id=36003" alt="HTML stat counters" /></a><!--END RiteCounter--></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/zuse.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/zuse.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zuse.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zuse.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zuse.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zuse.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zuse.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zuse.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zuse.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zuse.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zuse.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zuse.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zuse.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zuse.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zuse.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zuse.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zuse.wordpress.com&amp;blog=399867&amp;post=4&amp;subd=zuse&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zuse.wordpress.com/2006/10/08/chinese-english-dictionary-lisp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60327919047ac25c2bae1a648fa7ab4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gb</media:title>
		</media:content>

		<media:content url="http://zuse.files.wordpress.com/2006/10/screenshot-cidian.thumbnail.png" medium="image">
			<media:title type="html">Sample Screenshot of Hanzi with DOS-only Character</media:title>
		</media:content>

		<media:content url="http://www.ritecounter.com/scripts/htmlc.php?id=36003" medium="image">
			<media:title type="html">HTML stat counters</media:title>
		</media:content>
	</item>
		<item>
		<title>Comic Panel Generator (Java)</title>
		<link>http://zuse.wordpress.com/2006/10/08/comic-panel-generator-java/</link>
		<comments>http://zuse.wordpress.com/2006/10/08/comic-panel-generator-java/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 19:55:09 +0000</pubDate>
		<dc:creator>gb</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://zuse.wordpress.com/2006/10/08/comic-panel-generator-java/</guid>
		<description><![CDATA[  This is a simple prototype for a comic panel generator.  Given character images, a background image, and text, it produces comic panels  with standard speech ballons.  The layout is predefined, though the order of speech is configurable.  One neat feature is that URL filenames are valid, so images off of the internet can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zuse.wordpress.com&amp;blog=399867&amp;post=6&amp;subd=zuse&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>  This is a simple prototype for a comic panel generator.  Given character images, a background image, and text, it produces comic panels  with standard speech ballons.  The layout is predefined, though the order of speech is configurable.  One neat feature is that URL filenames are valid, so images off of the internet can be pulled directly into the panel.</p>
<p align="left">  Example panels and a screenshot are shown below. The original background image is from <a href="http://www.struat.com/here/eek2.jpg">http://www.struat.com/here/eek2.jpg</a>. </p>
<p align="center">  <a href="http://zuse.files.wordpress.com/2006/10/expanel1.png" title="Panel 1"><img src="http://zuse.files.wordpress.com/2006/10/expanel1.thumbnail.png?w=450" alt="Panel 1" /></a> <a href="http://zuse.files.wordpress.com/2006/10/expanel2.png" title="Panel 2"><img src="http://zuse.files.wordpress.com/2006/10/expanel2.thumbnail.png?w=450" alt="Panel 2" /></a> <a href="http://zuse.files.wordpress.com/2006/10/expanel-cap.jpg" title="Screenshot"><img src="http://zuse.files.wordpress.com/2006/10/expanel-cap.thumbnail.jpg?w=450" alt="Screenshot" /></a></p>
<p>Here is the zipped source code.  Note that it is written in Java 1.5.  The GUI was developed using the NetBeans IDE.<br />
<a href="http://www.box.net/public/t6004hgc6o">Source Code</a></p>
<p>Good source of character images:<br />
<a href="http://www.shawnsclipart.com/webart.html">http://www.shawnsclipart.com/webart.html</a><br />
 <br />
<!--RiteCounter--><strong>References<br />
</strong><a href="http://www.netbeans.org/products/ide/">NetBeans IDE</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/zuse.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/zuse.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zuse.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zuse.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zuse.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zuse.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zuse.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zuse.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zuse.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zuse.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zuse.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zuse.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zuse.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zuse.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zuse.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zuse.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zuse.wordpress.com&amp;blog=399867&amp;post=6&amp;subd=zuse&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zuse.wordpress.com/2006/10/08/comic-panel-generator-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60327919047ac25c2bae1a648fa7ab4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gb</media:title>
		</media:content>

		<media:content url="http://zuse.files.wordpress.com/2006/10/expanel1.thumbnail.png" medium="image">
			<media:title type="html">Panel 1</media:title>
		</media:content>

		<media:content url="http://zuse.files.wordpress.com/2006/10/expanel2.thumbnail.png" medium="image">
			<media:title type="html">Panel 2</media:title>
		</media:content>

		<media:content url="http://zuse.files.wordpress.com/2006/10/expanel-cap.thumbnail.jpg" medium="image">
			<media:title type="html">Screenshot</media:title>
		</media:content>
	</item>
	</channel>
</rss>
