<?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>Joost&#039;s blog &#187; Website</title>
	<atom:link href="http://joost.reuzel.nl/category/website/feed/" rel="self" type="application/rss+xml" />
	<link>http://joost.reuzel.nl</link>
	<description>Just some thoughts</description>
	<lastBuildDate>Wed, 18 Nov 2009 09:10:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel="next" href="http://joost.reuzel.nl/category/website/feed/?page=2" />

		<item>
		<title>ImageCloud plugin</title>
		<link>http://joost.reuzel.nl/2009/imagecloud/</link>
		<comments>http://joost.reuzel.nl/2009/imagecloud/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 18:27:36 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
				<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://joost.reuzel.nl/?p=114</guid>
		<description><![CDATA[During my work I got confronted with Wordle. A colleague used Wordle to show what a specific website was about. I got interested in how these beautiful word clouds were made and if I could add them to my own website. 
Regrettably, the Wordle algorithms cannot be shared by the author because of intellectual property ]]></description>
			<content:encoded><![CDATA[<p>During my work I got confronted with <a href="http://www.wordle.net/">Wordle</a>. A colleague used Wordle to show what a specific website was about. I got interested in how these beautiful word clouds were made and if I could add them to my own website. </p>
<p>Regrettably, the Wordle algorithms cannot be shared by the author because of intellectual property reasons (IBM owns his work). Given the popularity of Wordle, I found it strange that no WordPress plugin existed that would generate similar word clouds. Searching the web for similar algorithms didn&#8217;t provide me with much answers either. But hey, how hard can it be? I decided to have a go at it myself.</p>
<p><span id="more-114"></span><br />
What&#8217;s a word cloud? Basically it is a set of words fitted closely together in a oval shape. The words are of different sizes depending on their frequency in the corresponding text. Furthermore, the words may be of different colors and have different angles. I quickly decided I would support two angles only: horizontal and vertical words. The words would be different in size, and also the colors would match the frequency.</p>
<p>The algorithm is then relatively straightforward: </p>
<ol>
<li>calculate the font-size and color depending on the frequency of the words.</li>
<li>calculate the size of the boxes that will contain the words. In PHP that is easily done using the GD library</li>
<li>place the first box at coordinate (0,0).</li>
<li>Add the coordinates of the box corners to a list</li>
<li>Sort the list of corners based on their eucledian distance to the origin (0,0), keeping in mind the wanted oval shape of the cloud
<li>Place the next box to the first corner coordinate where the box doesn&#8217;t overlap already placed boxes</li>
<li>Add the corners of the newly placed boc to the coordinates list</li>
<li>Continue until all boxes are placed</li>
</ol>
<p>Given this algorithm, create a few classes (Point, Box, Cloud, Word and WordCloud) that implement all this. Add some image generation code and caching of the results (it does take some time to create and position all the words) and you&#8217;re done! To integrate it with WordPress I used one of the tag cloud hooks (if you&#8217;re looking for hooks in WordPress Adam R. Brown keeps a great <a href="http://adambrown.info/p/wp_hooks">hooks database</a>) . This hook provided me with all the information I needed: the tags, the links to those tags, the frequency numbers, etc. Furthermore, the wp_tag_cloud functions already support multiple formats so adding a new one was quite trivial. As a finishing touch I added a shortcode, so I didn&#8217;t need to go into a theme to change the tag cloud arguments to get my image cloud shown.</p>
<p>The plugin can be found on the WordPress extend site: <a href="http://wordpress.org/extend/plugins/imagecloud/">http://wordpress.org/extend/plugins/imagecloud/</a>  </p>
<p>Two example can be found <a href="http://joost.reuzel.nl/tags/">here</a> and <a href="http://minne.reuzel.nl/tags">here</a>.</p>
<p>It was fun creating this plugin. Hopefully you like the results. Feedback is always welcome!<br />
Joost</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.reuzel.nl/2009/imagecloud/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>text2tag plugin</title>
		<link>http://joost.reuzel.nl/2009/text2tag/</link>
		<comments>http://joost.reuzel.nl/2009/text2tag/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 13:51:53 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
				<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://joost.reuzel.nl/?p=111</guid>
		<description><![CDATA[I have been wondering how to keep the tags in a blog to describe its content accurately. As I&#8217;m not the most disciplined person, tagging posts correctly and precisely is not what I&#8217;m best at. During my work I encountered someone who had made use of Wordle. He used Wordle to quickly analyse the contents ]]></description>
			<content:encoded><![CDATA[<p>I have been wondering how to keep the tags in a blog to describe its content accurately. As I&#8217;m not the most disciplined person, tagging posts correctly and precisely is not what I&#8217;m best at. During my work I encountered someone who had made use of Wordle. He used Wordle to quickly analyse the contents of a website. The result was great. Simply counting the words seemed a simply and effective way to accurately describe the contents of a site. </p>
<p>So I ended up creating two plugins: one for creating tag-clouds that have the &#8220;Wordle&#8221; look and feel, and one for &#8220;tagging&#8221; posts, simply by enumerating all used words in a post. The first is described on an other post: <a href="http://joost.reuzel.nl/2009/imagecloud/" title="ImageCloud plugin">ImageCloud plugin</a>. The second has become the &#8220;text2tag&#8221; plugin.</p>
<p>The text2tag plugin can be downloaded from WordPress: <a href="http://wordpress.org/extend/plugins/text2tag/">Text2Tag</a>.<br />
<span id="more-111"></span></p>
<p>The text2tag plugin will convert every word that occurs in a post title or content into a term (tag). By default the plugin will add these terms to a new taxonomy called &#8220;words&#8221;. Optionally, the terms can be added to the &#8220;post_tags&#8221; taxonomy, used for normal tagging in WordPress. I did this because I did not want to overwrite the existing tags by default.</p>
<p>The plugin provides the option to create a so-called stop list. Words in this list will be kept (or even removed) from the taxonomy. This allows authors to ignore meaningless, but often occuring, words like &#8216;a&#8217; or &#8216;the&#8217;. An option is added to ignore numbers, as I find these uninteresting in most cases&#8230;</p>
<p>There are many opportunities for improvement. For example, stemming of words could be done. However, as I do not have the knowledge about such algorithms I did not add it. If you are capable of adding such features, please feel free to share your knowledge!</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.reuzel.nl/2009/text2tag/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New website new content</title>
		<link>http://joost.reuzel.nl/2009/new-website-new-content/</link>
		<comments>http://joost.reuzel.nl/2009/new-website-new-content/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 22:55:59 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
				<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://joost.reuzel.nl/?p=104</guid>
		<description><![CDATA[Hi all,
A fresh start for my new blog. New look and feel, new content. This time I plan to write more on my experiences with different technologies I encounter during work and at home. I&#8217;ve noticed that I learn a lot of what people share on the Internet, so this will be my corner where ]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>A fresh start for my new blog. New look and feel, new content. This time I plan to write more on my experiences with different technologies I encounter during work and at home. I&#8217;ve noticed that I learn a lot of what people share on the Internet, so this will be my corner where I can contribute&#8230;</p>
<p>More content to follow&#8230;</p>
<p>Joost</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.reuzel.nl/2009/new-website-new-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
