<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>web(cslai)</title>
	
	<link>http://cslai.coolsilon.com</link>
	<description>Findings and Notes in Web Development</description>
	<lastBuildDate>Tue, 06 Sep 2011 08:15:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/cslai" /><feedburner:info uri="cslai" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nc-sa/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><item>
		<title>Sorting Multilingual Data</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/HJ0l-Oyp4Rg/</link>
		<comments>http://cslai.coolsilon.com/2011/09/06/sorting-multilingual-data/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 08:14:37 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=266</guid>
		<description><![CDATA[Been trying my best to stick to the well-known UNIX Philosophy &#8211; &#8220;Do one thing and do it well&#8221;, so I have been breaking down my projects into numerous pieces of small tasks and rely on existing tools whenever possible. One of the existing tool that I use a lot is the GNU sort tool. [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/uFYdTAO1GrjcUAfzgX7nsOwq9Qg/0/da"><img src="http://feedads.g.doubleclick.net/~a/uFYdTAO1GrjcUAfzgX7nsOwq9Qg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/uFYdTAO1GrjcUAfzgX7nsOwq9Qg/1/da"><img src="http://feedads.g.doubleclick.net/~a/uFYdTAO1GrjcUAfzgX7nsOwq9Qg/1/di" border="0" ismap="true"></img></a></p><p>Been trying my best to stick to the well-known <a href="http://en.wikipedia.org/wiki/Unix_philosophy">UNIX Philosophy</a> &#8211; &#8220;Do one thing and do it well&#8221;, so I have been breaking down my projects into numerous pieces of small tasks and rely on existing tools whenever possible. One of the existing tool that I use a lot is the GNU sort tool. Generally sort utility is really doing fine and dandy without having to configure anything, at least not until I realize the problem that leads to this post.</p>
<p><span id="more-266"></span></p>
<p>Considering I am having input in this form</p>
<pre><code>
http://flickr.com/photos/tags/スラム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/スラム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/46857830@N03/5651576112 0
</code></pre>
<p>I am expecting result in this order</p>
<pre><code>
http://flickr.com/photos/tags/スラム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/スラム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/99996011@N00/5396566822 0
</code></pre>
<p>but I am getting this instead</p>
<pre><code>
http://flickr.com/photos/tags/スラム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/スラム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/99996011@N00/5396566822 0
</code></pre>
<p>After a quick search, it turns out that GNU sort actually <a href="http://stackoverflow.com/questions/4389520/unix-command-line-sort-utility-with-unicode-support">rely on LC_COLLATE</a> to do the sorting. I don&#8217;t really care about the character sequence order as long as I get consistent output, therefore the easiest way to fix this problem is obviously changing either LC_COLLATE, LC_ALL or LANG environment variable to &#8220;C&#8221;. However, to ensure the utility works the same elsewhere without interfering other scripts/programs relying on those environment variables, it would be easier to do <a href="http://www.madboa.com/geek/utf8/">this</a> instead</p>
<pre><code>
$ &lt;whatever command that produce output to stdOut&gt; | LC_COLLATE="C" sort
</code></pre>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=HJ0l-Oyp4Rg:3EDbxszcLfc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=HJ0l-Oyp4Rg:3EDbxszcLfc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/HJ0l-Oyp4Rg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/09/06/sorting-multilingual-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/09/06/sorting-multilingual-data/</feedburner:origLink></item>
		<item>
		<title>Setting Up Virtuoso for Redland Under Ubuntu</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/YZYZYquQqRo/</link>
		<comments>http://cslai.coolsilon.com/2011/08/02/setting-up-virtuoso-for-redland-under-ubuntu/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 07:54:26 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=261</guid>
		<description><![CDATA[Just a quick update to the previous post, the virtuoso storage engine works with redland provided the required packages are properly installed (yes, yes, yes, I know I haven&#8217;t release my PHP OO wrapper for Redland). Now that the package is installed, we need to do some configuration so that Redland can use it. Installing [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/tPRXV1jhwQ79mkjyNR4kAjjZXhA/0/da"><img src="http://feedads.g.doubleclick.net/~a/tPRXV1jhwQ79mkjyNR4kAjjZXhA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tPRXV1jhwQ79mkjyNR4kAjjZXhA/1/da"><img src="http://feedads.g.doubleclick.net/~a/tPRXV1jhwQ79mkjyNR4kAjjZXhA/1/di" border="0" ismap="true"></img></a></p><p>Just a quick update to the <a href="http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/">previous post</a>, the virtuoso storage engine works with <a href="http://librdf.org">redland</a> provided the required packages are properly installed (yes, yes, yes, I know I haven&#8217;t release my PHP OO wrapper for Redland). Now that the package is installed, we need to do some configuration so that Redland can use it.</p>
<p><span id="more-261"></span></p>
<h2>Installing Virtuoso</h2>
<p>Just a quick update to the <a href="http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/">previous post</a>, the virtuoso storage engine works with <a href="http://librdf.org">redland</a> provided the required packages are properly installed (yes, yes, yes, I know I haven&#8217;t release my PHP OO wrapper for Redland). Now that the package is installed, we need to do some configuration so that Redland can use it.</p>
<p><!--more--></p>
<h2>Running Virtuoso</h2>
<p>virtuoso-opensource and unixodbc-dev would have to be installed before virtuoso database can be started. After installing the required packages, make a copy of virtuoso.ini from /etc/virtuoso-opensource-6.1/virtuoso.ini to the directory where you want virtuoso to store the database.</p>
<pre><code>
$ mkdir foo
$ cp /etc/virtuoso-opensource-6.1/virtuoso.ini foo
</code></pre>
<p>Edit the ini file as desired, just make sure the configured ports aren&#8217;t being used by other processes (by default, virtuoso runs at port 1111 with web interface at port 8890, so if you are running another instance of it, change the port settings). If you are not interested in running another instance of virtuoso database, you can actually skip this part.</p>
<p>After everything is configured, just run this command at the directory.</p>
<pre><code>
$ cd foo
$ virtuoso-t -fd
</code></pre>
<p>For more information, please refer to this <a href="http://ods.openlinksw.com/wiki/main/Main/VOSUbuntuNotes">quick start guide</a>.</p>
<h2>Setting Up ODBC</h2>
<p>By referring to <a href="https://help.ubuntu.com/community/ODBC">this tutorial</a>, add these lines to /etc/odbc.ini (assuming the database name is SENSEIDB)</p>
<pre><code>
[SENSEIDB]
Driver = /usr/lib/odbc/virtodbc.so
Description = Sensei DB
Address = localhost:11111
</code></pre>
<h2>Making Redland to Work With Virtuoso</h2>
<p>Just make sure the ODBC configuration is done correctly, then follow the <a href="http://librdf.org/docs/api/redland-storage-module-virtuoso.html">guide</a> for <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtRDFDriverRedland">further instructions</a>.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=YZYZYquQqRo:vReToWsgjws:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=YZYZYquQqRo:vReToWsgjws:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/YZYZYquQqRo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/08/02/setting-up-virtuoso-for-redland-under-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/08/02/setting-up-virtuoso-for-redland-under-ubuntu/</feedburner:origLink></item>
		<item>
		<title>Building librdf-storage-virtuoso Package</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/upwFHyD5PyU/</link>
		<comments>http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 05:07:19 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=253</guid>
		<description><![CDATA[I wanted to try using virtuoso as the storage engine for Redland but unfortunately there is no librdf-storage-virtuoso package for Ubuntu. After getting some help from @dajobe, I attempted to build the packages myself. Although it takes quite some time to build packages, but not too difficult it seems. The version of Redland that I [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/0hXfUANgx6O3UtTd1jAv64ZNuGk/0/da"><img src="http://feedads.g.doubleclick.net/~a/0hXfUANgx6O3UtTd1jAv64ZNuGk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0hXfUANgx6O3UtTd1jAv64ZNuGk/1/da"><img src="http://feedads.g.doubleclick.net/~a/0hXfUANgx6O3UtTd1jAv64ZNuGk/1/di" border="0" ismap="true"></img></a></p><p>I wanted to try using virtuoso as the storage engine for Redland but unfortunately  there is no librdf-storage-virtuoso package for Ubuntu. After getting some help from <a href="https://twitter.com/#!/dajobe">@dajobe</a>, I attempted to build the packages myself. Although it takes quite some time to build packages, but not too difficult it seems.</p>
<p><span id="more-253"></span></p>
<p>The version of Redland that I am attempting to build is 1.0.13, and unfortunately this means I would have to build librasqal3 too as the version provided by Ubuntu Natty is not up to date. Installing the packages may cause some breakage, so&#8230; YMMV.</p>
<h2>Pre-requisites</h2>
<p>By following the instructions <a href="http://download.librdf.org/">here</a>, add this source repository to /etc/apt/sources.list</p>
<pre><code>
deb-src http://download.librdf.org/binaries/debian/unstable ./
</code></pre>
<p>And then run an apt-get update</p>
<pre><code>$ sudo apt-get update</code></pre>
<h2>Building Rasqal</h2>
<p>To build Rasqal, first grab the source package</p>
<pre><code>$ sudo apt-get source librasqal</code></pre>
<p>Grab the source packages</p>
<pre><code>
$ sudo apt-get source librasqal3
</code></pre>
<p>.. install the dependencies</p>
<pre><code>$ sudo apt-get build-dep librasqal3 librasqal3-dev</code></pre>
<p>Then build them</p>
<pre><code>$ sudo apt-get -b source librasqal3</code></pre>
<p>Then install librasqal3, librasqal3-dev, rasqal-utils</p>
<h2>Build Redland</h2>
<p>First we will need to grab the packages</p>
<pre><code>$ sudo apt-get -b source librdf0</code></pre>
<p>You may get an error saying some packages can&#8217;t be downloaded, in particular the source package. Just download <a href="http://download.librdf.org/source/redland-1.0.13.tar.gz">this</a> into the same directory as the other downloaded tarballs and rename it as redland_1.0.13.orig.tar.gz (Note: as of writing, source packages for 1.0.14 is not out yet, you may want to adjust when package for 1.0.14 is out).</p>
<p>There are some other dependencies besides the listed ones that needs to be installed, to install all of them, issue these commands</p>
<pre><code>
$ sudo apt-get install virtuoso-opensource unixodbc-dev
$ sudo apt-get build-dep librdf0
</code></pre>
<p>Now we can proceed to build Redland</p>
<pre><code>$ sudo apt-get -b source librdf0</code></pre>
<p>To build librdf-storage-virtuoso, Navigate to $REDLAND_SRC/redland-1.0.13/debian and edit a file named &#8216;control&#8217; (without the quotes). Append this to the end of the file.</p>
<pre><code>
Package: librdf-storage-virtuoso
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: librdf0 (<< 1.0.9-3)
Description: RDF library, Virtuoso backend
 Redland is a library that provides a high-level interface for RDF
 (Resource Description Framework) implemented in an object-based API.
 It is modular and supports different RDF/XML parsers, storage
 mechanisms and other elements. Redland is designed for applications
 developers to provide RDF support in their applications as well as
 for RDF developers to experiment with the technology.
 .
 This package contains the Virtuoso storage backend.
</code></pre>
<p>Edit a file named 'files' (without the quotes) and append this line</p>
<pre><code>
librdf-storage-virtuoso_1.0.13-2_i386.deb libs optional
</code></pre>
<p>Add a new file named librdf-storage-virtuoso.install with the following content</p>
<pre><code>
debian/tmp/usr/lib/redland/librdf_storage_virtuoso.so
</code></pre>
<p>Add another file named librdf-storage-virtuoso.substvars</p>
<pre><code>
shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libdb4.8, librdf0 (>= 1.0.13), unixodbc (>= 2.2.11)
misc:Depends=
</code></pre>
<p>Not sure what happens, but that was the edited version after building the packages, my original version is shown below (will update once I find out why)</p>
<pre><code>
shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libdb4.8, librdf0 (>= 1.0.13), unixodbc-dev (>= 2.2.14p2-2ubuntu1), virtuoso-opensource (>= 6.1.2+dfsg1-1ubuntu4)
misc:Depends=
</code></pre>
<p><del datetime="2011-07-27T06:21:44+00:00">Lastly, create a new file named librdf-storage-virtuoso.debhelper.log from librdf-storage-mysql.debhelper.log</del> Apparently this file is generated automatically, thanks @dajobe for the <a href="https://twitter.com/#!/dajobe/status/96086263605624833">tip</a> again.</p>
<p>Lastly, navigate back to $REDLAND_SRC and build the packages again</p>
<pre><code>
# apt-get -b source librdf0
</code></pre>
<h2>Building Redland-bindings</h2>
<p>Same thing again, first grab the source packages</p>
<pre><code>
$ sudo apt-get source redland-bindings
</code></pre>
<p>Since I am just interested in the php5-librdf package, I issue this to fetch the dependencies</p>
<pre><code>
$ sudo apt-get build-dep php5-librdf
</code></pre>
<p>Proceed with building</p>
<pre><code>$ sudo apt-get -b source php5-librdf</code></pre>
<p>Everything looks fine as of now, but I am seeing some random conflicts. Will try to work with the virtuoso storage engine and post a follow up later today.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=upwFHyD5PyU:JNLfU8HWXuM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=upwFHyD5PyU:JNLfU8HWXuM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/upwFHyD5PyU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/</feedburner:origLink></item>
		<item>
		<title>Fuzzy C-Means and Content Recommendation</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/zVXuhbsBLuQ/</link>
		<comments>http://cslai.coolsilon.com/2011/07/12/fuzzy-c-means-and-content-recommendation/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 08:22:09 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Recommender System]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=248</guid>
		<description><![CDATA[This post is purely based on my own speculation as there&#8217;s no experiment on real-life data to actually back the arguments. I am currently trying to document down a plan for my experiment(s) on recommender system (this reminds me that I have not release the Flickr data collection tool :/) and my supervisor advised to [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/OPzHAEKEAPcvO03xkW9xJka1zs0/0/da"><img src="http://feedads.g.doubleclick.net/~a/OPzHAEKEAPcvO03xkW9xJka1zs0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/OPzHAEKEAPcvO03xkW9xJka1zs0/1/da"><img src="http://feedads.g.doubleclick.net/~a/OPzHAEKEAPcvO03xkW9xJka1zs0/1/di" border="0" ismap="true"></img></a></p><p>This post is purely based on my own speculation as there&#8217;s no experiment on real-life data to actually back the arguments. I am currently trying to document down a plan for my experiment(s) on recommender system (this reminds me that I have not release the Flickr data collection tool :/) and my supervisor advised to write a paragraph or two on some of the key things. Since he is not going to read it, so I might as well just post it here as a note.</p>
<p><span id="more-248"></span></p>
<p>The idea of using tag clusters is based on the papers published by <a href="http://www.jonathangemmell.com/">Gemmell</a> et al. during year 2008-2009 in which they used tag clusters to find out relevance between user and resources in their recommender system. The reason of using tag clusters instead of using tags alone is mainly to address two problems that are commonly found in folksonomies &#8211; tag ambiguity (polysemy) and tag redundancy (synonym) problems.</p>
<p><a href="http://en.wikipedia.org/wiki/Cluster_analysis#Fuzzy_c-means_clustering">Fuzzy C-Means Clustering</a> (<abbr title="Fuzzy C-Means">FCM</abbr>) is one of the fuzzy clustering methods where each node do not necessary belong to only one cluster. Instead, they may be a member of one or more clusters with different degree of membership. For example, if one model tags as points in a vector space, each tag may belong to one or more clusters, which is theoretically useful because some tags may carry different meanings (polysemy) depending on the context (user interest).</p>
<p>While the diagram in my previous <a href="http://cslai.coolsilon.com/2011/06/23/implementing-fuzzy-c-means-in-clojure/">post</a> (my attempt to implement FCM clustering algorithm using <a href="http://clojure.org/">clojure</a>, not of production quality though) only shows each point belong to one cluster, the fact is each of the point may belong to more than one cluster. The line connecting each point to the cluster centroid is showing the most prominent relationship between a point with all the available clusters.</p>
<p>Similar to the approach used by Gemma et al., we are modeling users and resources using vector of tags. The weighting scheme to produce each tag entry would be most probably an adaptation of <abbr title="term frequency">tf</abbr>*<abbr title="inverse document frequency">idf</abbr> used by most of the tag-based recommender systems. Now that each cluster is also a vector of tags, the degree of membership values are also treated as weights.</p>
<p>To calculate similarity between resources and tag clusters (which are all in vectors), there are <a href="http://irthoughts.wordpress.com/2008/10/29/similarity-pearson-and-spearman-coefficients/">some approaches</a> that may be used (just discovered this after a quick search at Google, will read after publishing this). Adapting <a href="http://cslai.coolsilon.com/2011/03/30/recommender-system-classification/">collaborative filtering</a> into the original design published by Gemmell at el. is not too difficult, at least theoretically (yes, as mentioned, this post is full of <del datetime="2011-07-12T07:05:21+00:00">crap</del> speculation). All we need to do is just to find out a list of n similar user using the similarity measure, and then compare this group of users with the tag cluster to find out the degree of relationship between them.</p>
<p>Information extracted by traversing social graph, community/group membership as well as ratings (mark as favorite, +1, like) may be also applied somewhere in between, but I still can&#8217;t find where can it be used for now, will post followup whenever there is an update.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=zVXuhbsBLuQ:Emi_If20W7w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=zVXuhbsBLuQ:Emi_If20W7w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=zVXuhbsBLuQ:Emi_If20W7w:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=zVXuhbsBLuQ:Emi_If20W7w:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=zVXuhbsBLuQ:Emi_If20W7w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=zVXuhbsBLuQ:Emi_If20W7w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=zVXuhbsBLuQ:Emi_If20W7w:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=zVXuhbsBLuQ:Emi_If20W7w:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/zVXuhbsBLuQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/07/12/fuzzy-c-means-and-content-recommendation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/07/12/fuzzy-c-means-and-content-recommendation/</feedburner:origLink></item>
		<item>
		<title>Implementing Fuzzy c-means in Clojure</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/RrNMElZzRm0/</link>
		<comments>http://cslai.coolsilon.com/2011/06/23/implementing-fuzzy-c-means-in-clojure/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 17:19:04 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Clustering]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=236</guid>
		<description><![CDATA[I was asked to evaluate fuzzy c-means to find out whether it is a good clustering algorithm for my MPhil project. So I spent the whole afternoon reading through some tutorial to get some basic understanding. Then I thought why not implement it in Clojure because it doesn&#8217;t look too complicated (I was so wrong&#8230;). [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/vZtgwQvfIRU9_LRC9Nny_r2o6dU/0/da"><img src="http://feedads.g.doubleclick.net/~a/vZtgwQvfIRU9_LRC9Nny_r2o6dU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vZtgwQvfIRU9_LRC9Nny_r2o6dU/1/da"><img src="http://feedads.g.doubleclick.net/~a/vZtgwQvfIRU9_LRC9Nny_r2o6dU/1/di" border="0" ismap="true"></img></a></p><p>I was asked to evaluate fuzzy c-means to find out whether it is a good clustering algorithm for my MPhil project. So I spent the whole afternoon reading through some tutorial to get some basic understanding. Then I thought why not implement it in <a href="http://clojure.org">Clojure</a> because it doesn&#8217;t look too complicated (I was so wrong&#8230;).</p>
<p><span id="more-236"></span></p>
<p>I based my implementation on the tutorial posted <a href="https://sites.google.com/site/dataclusteringalgorithms/fuzzy-c-means-clustering-algorithm">here</a>. <del datetime="2011-06-23T08:35:24+00:00">However I still don&#8217;t understand how the terminate condition is met so I am setting the function to loop only like 10 times for now (until I understand it better).</del> Added the objective function, loop will stop when the next result is higher than the current result.</p>
<p>My current code for fuzzy c-means:</p>
<pre><code class="lisp">(ns sensei.clustering.fcm)

(use 'clojure.set
     '[incanter core stats])

(defn fcm[data cluster-count fuzziness-index]
    (let [random-points (take
                          cluster-count
                          (repeatedly
                            #(matrix (take
                               (count (first data))
                               (repeatedly rand)))))
          degree-of-membership (fn [point centroids cluster-index]
                                   (let [power #(pow % (/ 2 (- fuzziness-index 1)))]
                                     (/ 1 (apply
                                            +
                                            (map
                                              #(power (/ (euclidean-distance point (nth centroids cluster-index))
                                                         (euclidean-distance point %)))
                                              centroids)))))
          fuzzy-membership (fn [centroids]
                               (map
                                 (fn [point]
                                     (map
                                       #(degree-of-membership point centroids %)
                                       (range cluster-count)))
                                 data))
          cluster-membership (fn [cluster-index membership]
                                 (map #(nth % cluster-index) membership))
          new-centroid (fn [members]
                           (div (apply
                             plus
                             (map
                               #(mult (pow (nth members %) fuzziness-index) (nth data %))
                               (range (count members))))
                           (apply
                             +
                             (map
                               #(pow (nth members %) fuzziness-index)
                               (range (count members))))))
          new-centroids (fn [membership]
                            (map
                              #(new-centroid (cluster-membership % membership))
                              (range cluster-count)))
          objective (fn [membership centroids]
                        (apply
                          +
                          (map
                            (fn [point-index]
                                (apply
                                  +
                                  (map
                                    #(* (pow (nth (nth membership point-index) %) fuzziness-index)
                                        (pow (euclidean-distance (nth data point-index) (nth centroids %)) 2))
                                    (range cluster-count))))
                            (range (count membership)))))
          cluster (fn re-cluster
                      ([membership centroids] (re-cluster membership centroids (objective membership centroids)))
                      ([membership centroids objective-value]
                       (let [next-membership (fuzzy-membership centroids)
                             next-centroids (new-centroids next-membership)
                             next-objective (objective next-membership next-centroids)]
                         (if (>= next-objective objective-value)
                           (cons centroids membership)
                           (recur next-membership next-centroids next-objective)))))]
      (cluster (fuzzy-membership random-points) random-points)))</code></pre>
<p>My attempt to plot a graph showing the relationship between each point  and clusters. Only lines that shows the most degree of membership are shown in this example</p>
<pre><code class="lisp">(ns sensei.core)

(use 'sensei.clustering.fcm
     '[incanter core charts stats])

(let [data (take
             500
             (repeatedly
               #(matrix (take
                          2
                          (repeatedly rand)))))
      [centroids &#038; membership] (fcm data 5 5)
      chart (scatter-plot
              (map #(nth % 0) data)
              (map #(nth % 1) data))]
  (view (reduce
    (fn [chart point-index]
        (let [point-membership (nth membership point-index)
              max-membership (apply max point-membership)]
          (reduce
            (fn [chart cluster-index]
                (if (= max-membership (nth point-membership cluster-index))
                  (add-lines
                    chart
                    (vector (nth (nth centroids cluster-index) 0) (nth (nth data point-index) 0))
                    (vector (nth (nth centroids cluster-index) 1) (nth (nth data point-index) 1)))
                  chart))
            chart
            (range (count centroids)))))
    chart
    (range (count data)))))</code></pre>
<p>Example output:</p>
<p><a href="http://cslai.coolsilon.com/files/2011/06/fcm.png"><img src="http://cslai.coolsilon.com/files/2011/06/fcm.png" alt="fuzzy c-means" title="Graph Visualizing Fuzzy C-Means" width="498" height="370" class="alignnone size-full wp-image-241" /></a></p>
<div class="postscript">Updated 2011-06-23: Fixed some problems and added objective function in, but solution still doesn&#8217;t look right. Updated with image.</div>
<div class="postscript">Updated 2011-07-18: Found <a href="http://joshfinken.com/blog/2010/12/cluster-fuzzy-of-points.html">this</a> while looking for a better implementation.</div>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=RrNMElZzRm0:kCqpSUhcDU0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=RrNMElZzRm0:kCqpSUhcDU0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=RrNMElZzRm0:kCqpSUhcDU0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=RrNMElZzRm0:kCqpSUhcDU0:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=RrNMElZzRm0:kCqpSUhcDU0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=RrNMElZzRm0:kCqpSUhcDU0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=RrNMElZzRm0:kCqpSUhcDU0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=RrNMElZzRm0:kCqpSUhcDU0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/RrNMElZzRm0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/06/23/implementing-fuzzy-c-means-in-clojure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/06/23/implementing-fuzzy-c-means-in-clojure/</feedburner:origLink></item>
		<item>
		<title>How to solve all puzzles at 4clojure in a week</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/JEvh4HFTsEY/</link>
		<comments>http://cslai.coolsilon.com/2011/06/02/how-to-solve-all-puzzles-at-4clojure-in-a-week/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 16:30:41 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=230</guid>
		<description><![CDATA[I was trying to learn scala and clojure to find one that I may want to use in my postgraduate project. After trying to learn scala for a couple of days, I gave up because I really don&#8217;t like the syntax (too OO for my liking). Then I continued with clojure and found myself liking [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/wzfYo72CPn9NqcgIba28wNIoTP4/0/da"><img src="http://feedads.g.doubleclick.net/~a/wzfYo72CPn9NqcgIba28wNIoTP4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/wzfYo72CPn9NqcgIba28wNIoTP4/1/da"><img src="http://feedads.g.doubleclick.net/~a/wzfYo72CPn9NqcgIba28wNIoTP4/1/di" border="0" ismap="true"></img></a></p><p>I was trying to learn <a href="http://www.scala-lang.org/">scala</a> and <a href="http://www.clojure.org/">clojure</a> to find one that I may want to use in my postgraduate project. After trying to learn scala for a couple of days, I gave up because I really don&#8217;t like the syntax (too OO for my liking). Then I continued with clojure and found myself liking the syntax better.</p>
<p><span id="more-230"></span></p>
<p>I briefly tried <a href="http://www.haskell.org/">haskell</a> through <a href="http://tryhaskell.org/">this interactive tutorial</a> before starting scala, so I first started with this <a href="http://try-clojure.org/">clojure equivalent web-app</a>. It is a great tutorial, but not quite enough to get myself started to code, so I went on with this <a href="https://github.com/relevance/labrepl">Labrepl</a> tutorial guide. The first few sessions was great but it became a bit difficult to follow due to the lack of instruction. Probably I am just being impatient.</p>
<p>A guy nicknamed raek at #clojure irc then suggested <a href="http://blip.tv/clojure">a couple of</a> <a href="http://learn-clojure.com/">other</a> <a href="http://java.ociweb.com/mark/clojure/article.html">resources</a> that I may be interested in. One of them is a web-app called <a href="https://4clojure.com/">4clojure</a>. Basically it is an app that creates a series of puzzles that let u fill in the blanks so that the statement becomes valid.</p>
<p>After about a week (started last Thursday, and finished on 1st June!), I have solved all posted puzzles (99 in total, and new puzzles are frequently added). The first few puzzles are kinda straight forward, but the later ones took me like hours to half a day to actually came out with a rough idea. Implementing it also took quite some time as I am still not used to programming in functional way.</p>
<p>Some of the puzzles that I kinda like, although the code count is on the high side of the histogram (most people solves the same problem with less code). Besides, I don&#8217;t really care about computation complexity because I have not learned it in proper manner (lol, that means I don&#8217;t really understand Big-O notation)</p>
<h2><a href="https://4clojure.com/problem/94">Game of Life</a> (Problem 94)</h2>
<p>Assuming everyone knows about the game, I guess I would just post the solution straight away.</p>
<pre><code>(fn [i-board]
     (let [
           c-count (count (first i-board))
           r-count (count i-board)
           in-board (fn [i-coor]
                            (let [[i-row i-col] i-coor]
                              (and
                                (>= i-row 0)
                                (< i-row r-count)
                                (>= i-col 0)
                                (< i-col c-count))))
           has-life (fn [i-coor]
                        (= \# (nth (nth i-board (first i-coor)) (last i-coor))))
           board-coor (reduce
                        concat
                        '()
                        (map
                          (fn [my-row]
                              (map #(vector my-row %) (range c-count)))
                          (range r-count)))
           live-list (filter has-life board-coor)
           dead-list (filter #(not (has-life %)) board-coor)
           neighbour (fn [i-coor]
                         (let [[i-row i-col] i-coor]
                           (filter
                             #(let [[my-row my-col] %] (not (and (= my-row i-row) (= my-col i-col))))
                             (reduce
                               concat
                               '()
                               (map
                                 (fn [i-coors]
                                     (filter in-board i-coors))
                                 (map
                                   (fn [my-row]
                                       (map
                                         (fn [my-col]
                                             (vector my-row my-col))
                                         (range (dec i-col) (+ i-col 2))))
                                   (range (dec i-row) (+ i-row 2))))))))
           living-neighbour (fn [i-coor] (filter has-life (neighbour i-coor)))
           lives-on (fn [i-coor]
                        (let [n-count (count (living-neighbour i-coor))]
                          (or (= 2 n-count) (= 3 n-count))))
           reproducible (fn [i-coor]
                            (= 3 (count (living-neighbour i-coor))))
           new-lives (group-by
                       #(first %)
                       (concat
                         (filter lives-on live-list)
                         (filter reproducible dead-list)))
           draw-row (fn plot-lives
                        ([i-row] (plot-lives [] 0 (sort (map last (get new-lives i-row)))))
                        ([result i-pos i-lives]
                         (if (= c-count i-pos)
                           (apply str result)
                           (let [c-life (first i-lives) n-pos (inc i-pos)]
                             (if (= i-pos c-life)
                               (plot-lives (conj result \#) n-pos (rest i-lives))
                               (plot-lives (conj result \space) n-pos i-lives))))))
           ]
       (map draw-row (range r-count))))</code></pre>
<p>OK, I know this is one of the longest solution one can write (and perhaps not the most efficient way).</p>
<h2><a href="https://4clojure.com/problem/92">Roman Numbers</a> (Problem 92)</h2>
<p>Completing this also mean I need to be able to read the numbers properly too.</p>
<pre><code>(fn roman
     ([i-literal] (roman 0 i-literal))
     ([i-result i-literal]
      (if (zero? (count i-literal))
        i-result
        (let [
              v-map {\I 1, \V 5, \X 10, \L 50, \C 100, \D 500 \M 1000}
              head (first i-literal)
              tail (rest i-literal)
              t-head (first tail)
              ]
          (if (and (not (nil? t-head)) (> (get v-map t-head) (get v-map head)))
            (roman (+ i-result (- (get v-map t-head) (get v-map head))) (rest tail))
            (roman (+ i-result (get v-map head)) tail))))))</code></pre>
<p>I really hate graphs/trees related puzzles, like this following puzzle.</p>
<h2><a href="https://4clojure.com/problem/91">Graph Connectivity</a> (Problem 91)</h2>
<p>Given a set of edges, find if the graph is connected.</p>
<pre><code>(fn [i-set]
     (let [
           nodes (reduce
                   #(conj (conj %1 (first %2)) (last %2))
                   #{}
                   i-set)

           n-count (count nodes)
           n-range (range n-count)
           n-map (apply hash-map (interleave nodes n-range))
           n-index (fn [i-node] (get n-map i-node))

           edges (concat i-set (map #(apply vector (reverse %)) i-set))
           grouped-edges (group-by #(n-index (first %)) edges)

           n-dest (fn [i-node]
                      (map last (get grouped-edges (n-index i-node))))
           walk-graph (fn discover
            ([i-node] (discover #{} (hash-set i-node)))
            ([result discovered]
             (if (zero? (count discovered))
               result
               (let [
                     current (first discovered)
                     n-result (conj result current)
                     new-nodes (filter #(not (contains? n-result %)) (n-dest current))
                     ]
                 (discover n-result (reduce conj (apply hash-set (rest discovered)) new-nodes))))))
           ]
       (= nodes (walk-graph (first (first i-set))))))</code></pre>
<p>This answer sort of gave me idea on how to solve the following 2 very similar questions (although most people don't agree). Note how I start not to care about the code length.</p>
<h2><del datetime="2011-06-01T15:57:37+00:00">Word Chain</del><a href="https://4clojure.com/problem/82">Word Ladder</a> (Problem 82)</h2>
<p>According to <a href="http://www.wikipedia.org/">Wikipedia</a>, the game is actually called <a href="http://en.wikipedia.org/wiki/Word_Ladder">Word Ladder</a> instead of <a href="http://en.wikipedia.org/wiki/Word_chain">Word Chain</a>.</p>
<pre><code>(fn [i-words]
     (let [
           n-count (count i-words)
           n-range (range n-count)
           n-map (apply hash-map (interleave i-words n-range))
           n-index (fn [i-word] (get n-map i-word))

           edit-distance (fn diff ([a-word b-word] (diff 0 a-word b-word))
                             ([distance a-word b-word]
                              (let [
                                    a-head (first a-word)
                                    b-head (first b-word)

                                    a-tail (rest a-word)
                                    b-tail (rest b-word)

                                    a-next (first a-tail)
                                    b-next (first b-tail)
                                    ]
                                (if (and (nil? a-head) (nil? b-head))
                                  distance
                                  (if (= a-head b-head)
                                    (diff distance a-tail b-tail)
                                    (if (= a-next b-head)
                                      (diff (inc distance) a-tail b-word)
                                      (if (= a-head b-next)
                                        (diff (inc distance) a-word b-tail)
                                        (diff (inc distance) a-tail b-tail))))))))
           edges (reduce
                   (fn [result i-word]
                       (reduce
                         #(conj %1 (vector i-word %2))
                         result
                         (filter #(= 1 (edit-distance i-word %)) i-words)))
                   #{}
                   i-words)
           grouped-edges (group-by #(n-index (first %)) edges)

           n-dest (fn [i-word]
                      (map last (get grouped-edges (n-index i-word))))

           build-chains (fn chain
                            ([i-word] (chain (dec n-count) (vector (vector i-word))))
                            ([i result]
                             (if (zero? i)
                               result
                               (chain
                                 (dec i)
                                 (reduce
                                   concat
                                   []
                                   (map
                                     (fn [i-chain]
                                         (map
                                           #(conj (apply vector i-chain) %)
                                           (filter #(not (contains? (apply hash-set i-chain) %)) (n-dest (last i-chain)))))
                                     result))))))
           ]
       (reduce
         (fn [result i-word]
             (if (false? result)
               (boolean (some #(= (count %) n-count) (build-chains i-word)))
               result))
         false
         i-words)))</code></pre>
<h2><a href="https://4clojure.com/problem/89">Graph Tour</a> (Problem 89)</h2>
<pre><code>(fn [i-edges]
     (let [
           nodes (reduce #(conj (conj %1 (first %2)) (last %2)) #{} i-edges)

           n-count (count nodes)
           n-range (range n-count)
           n-map (apply hash-map (interleave nodes n-range))
           n-index (fn [i-node] (get n-map i-node))

           e-count (count i-edges)

           edges-count (fn [my-edges]
                           (reduce
                             (fn [result i-edge]
                                 (let [[edge occurences] i-edge]
                                   (conj result (hash-map edge (count occurences)))))
                             {}
                             (group-by #(apply vector %) (map sort my-edges))))
           edge-count (fn [i-edge]
                          (let [e-count (edges-count i-edges)]
                            (get e-count i-edge 0)))

           edges (concat i-edges (map #(apply vector (reverse %)) i-edges))
           grouped-edges (group-by #(n-index (first %)) edges)

           n-dest (fn [i-node]
                      (reduce #(conj %1 (last %2)) #{} (get grouped-edges (n-index i-node))))

           build-chains (fn chain
                            ([i-edge] (chain (dec e-count) (vector (vector i-edge))))
                            ([i result]
                             (if (zero? i)
                               result
                               (chain
                                 (dec i)
                                 (reduce
                                   concat
                                   []
                                   (map
                                     (fn [i-chain]
                                         (let [
                                               t-node (last (last i-chain))
                                               n-edges (map #(vector t-node %) (n-dest t-node))
                                               ]
                                           (filter
                                             (fn [my-chain]
                                                 (reduce
                                                   (fn [result i-edge]
                                                       (let [[edge o-count] i-edge]
                                                         (and result (>= (edge-count edge) o-count))))
                                                   true
                                                   (edges-count my-chain)))
                                             (map #(conj i-chain %) n-edges))))
                                     result))))))
           ]
       (reduce
         (fn [result i-edge]
             (if (false? result)
               (boolean (some #(= (count %) e-count) (build-chains i-edge)))
               result))
         false
         i-edges)))</code></pre>
<p>I guess that's all for now lol. Oh, my supervisor's reaction (his primary language is probably JAVA) to scala and clojure was - try not to learn strange (weird) language. Then he mentioned about bad employment opportunity or something I don't really care to remember (I am actually trying very hard to avoid learning JAVA because I don't like it). So I guess this is it.</p>
<p>There may be some other interesting questions that I may have missed. Hopefully I will have the time to revisit on this and post more solutions.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=JEvh4HFTsEY:_NuWifN-kdU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JEvh4HFTsEY:_NuWifN-kdU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=JEvh4HFTsEY:_NuWifN-kdU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JEvh4HFTsEY:_NuWifN-kdU:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JEvh4HFTsEY:_NuWifN-kdU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=JEvh4HFTsEY:_NuWifN-kdU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JEvh4HFTsEY:_NuWifN-kdU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JEvh4HFTsEY:_NuWifN-kdU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/JEvh4HFTsEY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/06/02/how-to-solve-all-puzzles-at-4clojure-in-a-week/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/06/02/how-to-solve-all-puzzles-at-4clojure-in-a-week/</feedburner:origLink></item>
		<item>
		<title>Redland for RDF Work</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/xuxSmNAAlJ8/</link>
		<comments>http://cslai.coolsilon.com/2011/05/13/redland-for-rdf-work/#comments</comments>
		<pubDate>Fri, 13 May 2011 06:47:20 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Semantic Web]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=226</guid>
		<description><![CDATA[Although my supervisor strongly recommend using JENA for RDF related work, but as I really don&#8217;t like Java (just personal preference), and wouldn&#8217;t want to install JRE/JVM (whatever it is called) at my shared server account, so I went to look for an alternative. After spending some time searching, I found this library called Redland [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/eZsiMKaCHVDGM3R5TaABimKXjX0/0/da"><img src="http://feedads.g.doubleclick.net/~a/eZsiMKaCHVDGM3R5TaABimKXjX0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/eZsiMKaCHVDGM3R5TaABimKXjX0/1/da"><img src="http://feedads.g.doubleclick.net/~a/eZsiMKaCHVDGM3R5TaABimKXjX0/1/di" border="0" ismap="true"></img></a></p><p>Although my supervisor strongly recommend using JENA for RDF related work, but as I really don&#8217;t like Java (just personal preference), and wouldn&#8217;t want to install JRE/JVM (whatever it is called) at my shared server account, so I went to look for an alternative. After spending some time searching, I found this library called <a href="http://librdf.org/">Redland</a> and it provides binding for my current favorite language &#8212; PHP, so I decided to use this for my RDF work.</p>
<p><span id="more-226"></span></p>
<p>I used pure relational database approach (postgresql to be exact) to store information collected via flickr initially, but it wouldn&#8217;t really scale (or I just simply suck at designing/maintaining database tables) and my queries got killed numerously by the web host. Besides that, as the table grow larger, the amount of resource consumed to serve a query also grow, hence I needed to find another way to store the data. At first I thought of using some popular noSQL solutions, but my supervisor told me to turn the data into RDF format instead. So I went on with Redland and use postgresql (again) as storage.</p>
<p>However, for some reason, postgresql doesn&#8217;t seem to work efficiently and a simple query can take tens of minutes to run when it holds more than 100k RDF statements. For some reason, the <a href="http://stackoverflow.com/questions/5882707/getting-statements-from-redland-hash-storage">hash storage doesn&#8217;t work</a> on my Ubuntu development VM, so I switched the storage engine to MySQL after <a href="https://twitter.com/#!/dajobe/status/67969726550253568">@dajobe&#8217;s suggestion</a>.</p>
<p>However, as PHP binding apparently not that popular, so there aren&#8217;t much information / tutorial posted. I actually wanted to write a collection of scripts to collect data from <a href="http://flickr.com/">flickr</a> for my research project, so I began with finding an existing script for that task. However, I didn&#8217;t find good ones in PHP, so I ported <a href="https://github.com/straup/p5-Net-Flickr-RDF">this from Perl</a> to PHP and use Redland. Then after knowing how it really works, I rewrote everything again from scratch (will put them up to bitbucket when I have time to clean up). I even wrapped the library with class methods, which I hope to release later (I only knew about another <a href="http://blog.literarymachine.net/?p=5">OO wrapper in PHP</a> for Redland after almost done writing my scripts).</p>
<p>To use Redland&#8217;s PHP functions without OO wrapper, we always start with a statement to build a world. I am not very sure what this means (yes, I didn&#8217;t really read the <a href="http://librdf.org/docs/api/index.html">documentation</a> that thoroughly), but it seems that almost all constructor functions depend on it to create new object (yes, Redland has this OO feel although all the function calls are in procedural style). So, in PHP, the statement would look like:</p>
<pre class="php"><code>$world = librdf_new_world();</code></pre>
<p>Then you would want to decide <a href="http://librdf.org/docs/api/redland-storage-modules.html">where to store your RDF statements</a>. For this piece of note, I will just use non-persistent memory store. So the function call to build a storage object is</p>
<pre class="php"><code>$storage = librdf_new_storage($world, 'memory', $name, $options);</code></pre>
<p>where <code>$name</code> stores the name of the storage object, and <code>$options</code> often carries the <abbr title="Database Source Name">DSN</abbr>, but in our case it is NULL. Now that we have storage defined, then we proceed with building a model to actually store RDF statements into the storage (it would be easy to think model as a database library, and storage as an abstraction layer).</p>
<pre class="php"><code>$model = librdf_new_model($world, $storage, NULL);</code></pre>
<p>Statements are consists of nodes, so let&#8217;s create some. To create a URI node, it is just as easy as</p>
<pre class="php"><code>$foo = librdf_new_node_from_uri_string($world, 'urn:foo');
$bar = librdf_new_node_from_uri_string($world, 'urn:bar');</code></pre>
<p>Creating a literal node would be just as simple as</p>
<pre class="php"><code>$baz = librdf_new_node_from_literal($world, 'baz', NULL, FALSE);</code></pre>
<p>Putting them into a statement</p>
<pre class="php"><code>$statement = librdf_new_statement_from_nodes($world, $foo, $bar, $baz);</code></pre>
<p>which is the equivalent to this</p>
<pre><code>&lt;urn:foo&gt; &lt;urn:bar&gt; 'baz' .</code></pre>
<p>To run a query to the model, just simply send a SPARQL statement as follows</p>
<pre><code>
$query = librdf_new_query(
    $world,
    'sparql',
    NULL,
<<<SPARQL
SELECT  ?subject, ?object
WHERE   {
            ?subject <urn:bar> ?object .
        }
SPARQL
);
</code></pre>
<p>Running the query and get result</p>
<pre><code>$result = librdf_model_query_execute($model, $query);
var_dump(librdf_query_results_to_string2($result, 'json', 'application/json', NULL, NULL));</code></pre>
<p>Enjoy!</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=xuxSmNAAlJ8:gbCAw-hxxsE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xuxSmNAAlJ8:gbCAw-hxxsE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=xuxSmNAAlJ8:gbCAw-hxxsE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xuxSmNAAlJ8:gbCAw-hxxsE:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xuxSmNAAlJ8:gbCAw-hxxsE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=xuxSmNAAlJ8:gbCAw-hxxsE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xuxSmNAAlJ8:gbCAw-hxxsE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xuxSmNAAlJ8:gbCAw-hxxsE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/xuxSmNAAlJ8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/05/13/redland-for-rdf-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/05/13/redland-for-rdf-work/</feedburner:origLink></item>
		<item>
		<title>Recommender System Classification</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/BjBNuCEiRIQ/</link>
		<comments>http://cslai.coolsilon.com/2011/03/30/recommender-system-classification/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 07:00:55 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Recommender System]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=215</guid>
		<description><![CDATA[Had a discussion with my secondary supervisor and it turned out pretty bad because I wasn&#8217;t fully prepared and he was rushing to somewhere else for a meeting. So I am jotting down a brief summary (read: highly based on personal/subjective feelings/opinions) of my readings here to help organize things before the followup meeting that [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/UQKGGlNY80VP0e9srCw6Eh5saL8/0/da"><img src="http://feedads.g.doubleclick.net/~a/UQKGGlNY80VP0e9srCw6Eh5saL8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/UQKGGlNY80VP0e9srCw6Eh5saL8/1/da"><img src="http://feedads.g.doubleclick.net/~a/UQKGGlNY80VP0e9srCw6Eh5saL8/1/di" border="0" ismap="true"></img></a></p><p>Had a discussion with my secondary supervisor and it turned out pretty bad because I wasn&#8217;t fully prepared and he was rushing to somewhere else for a meeting. So I am jotting down a brief summary (read: highly based on personal/subjective feelings/opinions) of my readings here to help organize things before the followup meeting that is taking place next week.</p>
<p><span id="more-215"></span></p>
<p>For some reason, my secondary supervisor seems very skeptical with everything and keeps having argument with my primary supervisor in a lot of things. It is probably a good idea to ensure everyone is on the same page before I begin.</p>
<h2>Folksonomy / Collaborative Tagging</h2>
<p>Folksonomy is becoming the primary way web users organize their content. While rigid category may still being offered by some web-applications, the flexibility of folksonomy continue to attact more users to tag their resources using keywords<sup>[<a href="#cite-1">1</a>]</sup>.  Besides that, a particular content may be represented with different sets of keywords over time, and folksonomy works great in capturing this change of semantics.</p>
<p>While we cannot deny the fact that the flexibility may cause abuse to the system, but this is not a new problem and there are people working on it. Besides that, considering tags are just a list of keywords describing a resource, they can be considered as a document and can be modeled in a number of ways like how IR people model documents. If the IR people face problems like polysem, synonyms etc, the same problems are also applied to the tags. One of the solutions to the problem is the usage of dimensionality reduction techniques such as <abbr title="Latent Semantic Indexing">LSI</abbr>, <abbr title="probabilistic Latent Semantic Indexing">pLSI</abbr> or <abbr title="Latent Dirichlet Allocation">LDA</abbr> <sup>[<a href="#cite-2">2</a>]</sup>, or clustering tags to avoid ambiguity <sup>[<a href="#cite-4">4</a>]</sup>.</p>
<p>Encouraging people to tag their resources properly is not actually within the scope of my project, although it is known that collaborative tagging system typically suffered from ramp-up problem (arises when new user/item is added to the system or ratings/tags for an item is sparsely populated). I actually have no idea why is this raised in the previous discussion. However, my secondary supervisor is kind enough to point me to a project called <a href="http://www.gwap.com/espgame-a/start.html">ESP Game</a> which is a game to help tagging of pictures <sup>[<a href="#cite-3">3</a>]</sup>.</p>
<p>Conclusion: Tagging is a mean of organizing information that is gaining popularity, although it may be subjected to various problems, but it can be (to a certain extend) fixed.</p>
<h2>Web 2.0 Applications</h2>
<p>Again, both of my supervisors don&#8217;t seem to agree on the usefulness of web 2.0 applications. But as web 2.0 applications is gaining popularity, the amount of information generated is drastically increased and there may be a need to offer an alternative approach to enable users to discover them. It is not logical to say Web 2.0 application is built on flawed principles, and then the users deserve no more further innovation from the applications.</p>
<h2>Recommender System</h2>
<p>A recommender system is a system that recommend content to user to assist in discovery of new content and predict the degree of interest a user may have to an unrated item <sup>[<a href="#cite-5">5</a>]</sup>. Depending on different classification methods, they can be generally categorized into 2 major types.</p>
<h3>Content-based Recommender</h3>
<p>Content-based recommender works by comparing user&#8217;s profile to unseen content to predict whether he/she would like that content. In short, it is a system that recommend content based on this statement &#8211; &#8216;you liked A, B and C in the past, then you should like D which is similar to A, B and C&#8217; <sup>[<a href="#cite-5">5</a>, <a href="#cite-7">7</a>]</sup>.</p>
<h3>Collaborative-filtering</h3>
<p>Unlike content-based recommender, collaborative-filtering system compares an unseen content with profiles of other users with similar interests, then recommend it if others expressed their interest in the past. In short, it is a system that exercises &#8211; &#8216;Alice, Bob, and Charlie liked A, therefore you should also like A‘ (assuming Alice, Bob and Charlie share the same interest with the current user) <sup>[<a href="#cite-5">5</a>]</sup>.</p>
<p>Collaborative-filtering system can be further categorized into 2 types &#8211; memory-based and model-based <sup>[<a href="#cite-6">6</a>]</sup>.</p>
<h4>Memory-based</h4>
<p>To me, this is what a recommender should do ideally. Everything about content and users are stored in the storage and used in the recommender algorithm. However, this means it is heavily depending on content that may not necessarily annotated, or tagged appropriately.</p>
<h4>Model-based</h4>
<p>Model-based is implementing collaborative filtering in another way where a set of training data is usually fed to a learning algorithm to produce a mathematical model <sup>[<a href="#cite-6">6</a>]</sup>. Depending on implementation, an intermediate layer (probably lower dimension, depending on the model) is created to complement the incompleteness of annotated data.</p>
<p>Most of the current model consider all users are distributed independently and identically without considering relationships between them <sup>[<a href="#cite-6">6</a>]</sup>. However, in reality, we often turn to people having same interests for recommendations <sup>[<a href="#cite-7">7</a>]</sup>. Therefore, some people start utilizing social relationship and trust network into the modeling of recommendation algorithm <sup>[<a href="#cite-8">8</a>]</sup>.</p>
<p>Besides studying user&#8217;s social network, other relationships that may be observed are user-tag, user-content, and content-tag relationships. My research project will be more or less based on the research done by Ma et al <sup>[<a href="#cite-6">6</a>]</sup>. So as I am going this route, my first problem will be identifying which relationship(s) should be incorporated into the model.</p>
<h2>Data Sources and Domain</h2>
<p>I wanted to work on something that would help in travel itinerary planning. But as I may not have enough time (with only roughly 7 months left) to do that, I am scaling down the scope to build a system that recommend images. Data will most probably come from flickr through their API as <a href="http://stackoverflow.com/questions/5101763/is-using-an-api-always-preferable-to-scraping">suggested by fellow stackoverflowers</a>.</p>
<h2>What do I do next?</h2>
<p>As told by my primary supervisor, I am going to start drafting the initial design while keep reading more about this area.</p>
<h2>Further Readings</h2>
<ol>
<li id="cite-1">Shadbolt, Nigel, Tim Berners-Lee, and Wendy Hall. 2006. The Semantic Web Revisited. IEEE Intelligent Systems 21, no. 3 (May): 96-101. doi:10.1109/MIS.2006.62. http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=1637364.</li>
<li id="cite-2">Siersdorfer, Stefan, and Sergej Sizov. 2009. Social recommender systems for web 2.0 folksonomies. Proceedings of the 20th ACM conference on Hypertext and hypermedia &#8211; HT â09. New York, New York, USA: ACM Press. doi:10.1145/1557914.1557959. http://portal.acm.org/citation.cfm?doid=1557914.1557959.</li>
<li id="cite-3">Von Ahn, Luis, and Laura Dabbish. 2004. Labeling images with a computer game. Proceedings of the 2004 conference on Human factors in computing systems CHI 04 6, no. 1: 319-326. doi:10.1145/985692.985733. http://portal.acm.org/citation.cfm?doid=985692.985733.</li>
<li id="cite-4">Shepitsen, Andriy, Jonathan Gemmell, Bamshad Mobasher, and Robin Burke. 2008. Personalized recommendation in social tagging systems using hierarchical clustering. Proceedings of the 2008 ACM conference on Recommender systems RecSys 08: 259. doi:10.1145/1454008.1454048. http://portal.acm.org/citation.cfm?doid=1454008.1454048.</li>
<li id="cite-5">Szomszor, Martin, Ciro Cattuto, Harith Alani, Kieron OâHara, Andrea Baldassarri, Vittorio Loreto, and Vito D P Servedio. 2007. Folksonomies, the Semantic Web, and Movie Recommendation. eprintsecssotonacuk: 71-84. http://eprints.ecs.soton.ac.uk/14007/.</li>
<li id="cite-6">Ma, Hao, Haixuan Yang, Michael R Lyu, and Irwin King. 2008. Sorec: social recommendation using probabilistic matrix factorization. In Proceeding of the 17th ACM conference on Information and knowledge management, 931-940. ACM. doi:10.1145/1458082.1458205. http://portal.acm.org/citation.cfm?id=1458205.</li>
<li cite="cite-7">Shardanand, Upendra, and Pattie Maes. 1995. Social information filtering: algorithms for automating âword of mouth. In Proceedings of the ACM Conference on Human Factors in Computing Systems, ed. I R Katz, R Mack, L Marks, M B Rosson, and J Nielsen, 1:210-217. ACM Press/Addison-Wesley Publishing Co. doi:10.1145/223904.223931. http://portal.acm.org/citation.cfm?id=223931&amp;coll=portal&amp;d&#8230;N=53154003&amp;ret=1.</li>
<li id="cite-8">Andersen, Reid, Christian Borgs, Jennifer Chayes, Uriel Feige, Abraham Flaxman, Adam Kalai, Vahab Mirrokni, and Moshe Tennenholtz. 2008. Trust-based recommendation systems: an axiomatic approach. Industrial Engineering 08pages: 199-208. doi:10.1145/1367497.1367525. http://portal.acm.org/citation.cfm?doid=1367497.1367525.</li>
</ol>
<div class="postscript">I will be putting in the citation links and probably make revisions to this draft as I am preparing for the discussion taking place next week.</div>
<div class="postscript">Please not that this is prepared for a discussion with my supervisor and is not intended as a creditable piece of article because it is filled with my personal opinion (although it may look like backed by creditable papers).</div>
<div class="postscript">EDIT 2/4/2011: adding in some citations.</div>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=BjBNuCEiRIQ:mGB6tTVqk3E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=BjBNuCEiRIQ:mGB6tTVqk3E:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=BjBNuCEiRIQ:mGB6tTVqk3E:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=BjBNuCEiRIQ:mGB6tTVqk3E:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=BjBNuCEiRIQ:mGB6tTVqk3E:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=BjBNuCEiRIQ:mGB6tTVqk3E:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=BjBNuCEiRIQ:mGB6tTVqk3E:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=BjBNuCEiRIQ:mGB6tTVqk3E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/BjBNuCEiRIQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/03/30/recommender-system-classification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/03/30/recommender-system-classification/</feedburner:origLink></item>
		<item>
		<title>Collaborative Tagging &amp; Folksonomy</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/oIvKbCKZOMU/</link>
		<comments>http://cslai.coolsilon.com/2011/02/17/collaborative-tagging-folksonomy/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 03:28:20 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Semantic Web]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=207</guid>
		<description><![CDATA[Folksonomy is a neologism of two words, ’folk’ and ’taxonomy’ which describes conceptual structures created by users [4, 5]. A folksonomy is a set of unstructured collaborative usage of tags for content classification and knowledge representation that is popularized by Web 2.0 and social applications [1, 5]. Unlike taxonomy that is commonly used to organize [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/PAKAALF79WKxtbKg8Fo6Ul4NlvQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/PAKAALF79WKxtbKg8Fo6Ul4NlvQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/PAKAALF79WKxtbKg8Fo6Ul4NlvQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/PAKAALF79WKxtbKg8Fo6Ul4NlvQ/1/di" border="0" ismap="true"></img></a></p><p>Folksonomy is a neologism of two words, ’folk’ and ’taxonomy’ which describes conceptual structures created by users <sup>[<a href="#cite-4">4</a>, <a href="#cite-5">5</a>]</sup>. A folksonomy is a set of unstructured collaborative usage of tags for content classification and knowledge representation that is popularized by Web 2.0 and social applications <sup>[<a href="#cite-1">1</a>, <a href="#cite-5">5</a>]</sup>. Unlike taxonomy that is commonly used to organize resources to form a category hierarchy, folksonomy is non-hierarchical and non-exclusive <sup>[<a href="#cite-3">3</a>]</sup>. Both content hierarchy and folksonomy can be used together to better content classification.</p>
<p><span id="more-207"></span></p>
<p>Users of Web 2.0 applications typically organize their created content with a set of terms or keywords, also commonly known as tags <sup>[<a href="#cite-3">3</a>, <a href="#cite-4">4</a>, <a href="#cite-6">6</a>, <a href="#cite-7">7</a>]</sup>. Spending additional time and effort to provide annotation such as tags to a resource usually implicitly implies the relevance and/or importance of the resource to a user <sup>[<a href="#cite-1">1</a>]</sup>. Therefore, besides being used for content classification, tags assignment can also be analyze to find the implicit relationship between users and the tagged content.</p>
<p>It is also observed that the frequency of term usage is proportional to the level of importance or connection to user, i.e. the more a tag is used, the more it is important to the user <sup>[<a href="#cite-1">1</a>, <a href="#cite-8">8</a>]</sup>. The choice of tags when annotating a resource often express the user interest and perceptions <sup>[<a href="#cite-8">8</a>]</sup>. Users usually have different ideas and interests when tagging a resource especially when the application allow the same resource tagged by multiple users <sup>[<a href="#cite-2">2</a>]</sup>. Therefore tagging activity pattern can be studied to find a user’s domain of interest.<br />
Users with common interests tend to use similar set of tags in tagging re- sources of interest <sup>[<a href="#cite-2">2</a>]</sup>. The similarity of users can then be calculated through the tagging pattern for recommending purpose as it provides social relationships between users <sup>[<a href="#cite-4">4</a>, <a href="#cite-7">7</a>]</sup>. This may allow more collaboration between users sharing similar interest.</p>
<p>Although the variety selection of tag helps in better representation of the resource, but this may cause some problems as users don’t tend to agree to each other <sup>[<a href="#cite-2">2</a>]</sup>. Observations also shows tagging behaviour follows power law distribution where tags are mostly assigned to a small subset of more<br />
popular resources <sup>[<a href="#cite-2">2</a>, <a href="#cite-7">7</a>]</sup>. Hence, when a resource gets popular, users having different interests will attempt to assign tags with keywords from all different domains. However, when different tags that are semantically related from each other are assigned to related resources (vocabulary mismatch problem), it may drastically decrease the level of relevance although the tags may actually share similar meaning <sup>[<a href="#cite-3">3</a>, <a href="#cite-7">7</a>]</sup>.</p>
<p>Correlation between resources is often established when they are assigned with common tags <sup>[<a href="#cite-8">8</a>]</sup>. The level of relevance can then be observed by studying the similarity in their set of assigned tags <sup>[<a href="#cite-8">8</a>]</sup>. The correlation and similarity between the tags assigned to resources may also help users to find unseen resources by browsing the tags.</p>
<p>The assigned tags can be used as a tool to enable discovery, sharing and collaboration of web resources <sup>[<a href="#cite-1">1</a>, <a href="#cite-2">2</a>, <a href="#cite-3">3</a>, <a href="#cite-8">8</a>]</sup>. Some applications even allow sharing of tagging information <sup>[<a href="#cite-2">2</a>, <a href="#cite-8">8</a>]</sup>. Hence, besides using tags as a tool for content classification and user interest study, they can be used to make collaboration easier.</p>
<p>A resource may be described by its assigned tags depending on the tagging behaviour <sup>[<a href="#cite-1">1</a>]</sup>. When an tagging system follows the bag-model, i.e. system that allows multiple users to tag a resource, the frequency of a tag is assigned also indirectly shows the increased relevance between the tag and the resource <sup>[<a href="#cite-1">1</a>, <a href="#cite-2">2</a>, <a href="#cite-8">8</a>]</sup>. Weights can be also calculated for each tag to rank the relevance with the resource.<br />
On the other hand, systems that implements the set-model do not provide enough data to deduce the level of importance or popularity of an assigned tag to the resource <sup>[<a href="#cite-8">8</a>]</sup>. Due to the unstructured nature of collabo- rative tagging, the system can be easily abused if users assign tags that do not describe the content <sup>[<a href="#cite-1">1</a>, <a href="#cite-8">8</a>]</sup>. The problem is more apparent for system implementing the set-model as there is no way to rank the assigned tags.</p>
<h2>References</h2>
<ol>
<li id="cite-1">I. Cantador, A. Bellog ́ın, and D. Vallet. Content-based Recommendation in Social Tagging Systems. Methodology, pages 237–240, 2010.</li>
<li id="cite-2">Y. Guo and J. B. Joshi. Topic-based personalized recommendation for collaborative tagging system. Number 10. ACM Press, New York, New York, USA, 2010.</li>
<li id="cite-3">R. Lambiotte and M. Ausloos. Collaborative tagging as a tripartite network, 2005.</li>
<li id="cite-4">P. Mika. Ontologies are us: A unified model of social networks and semantics. Web Semantics Science Services and Agents on the World Wide Web, 5(1):5–15, 2007.</li>
<li id="cite-5">C. Schmitz, A. Hotho, R. J ̈aschke, and G. Stumme. Mining Association Rules in Folksonomies, pages 261–270. Studies in Classification, Data Analysis, and Knowledge Organization. Springer, 2006.</li>
<li id="cite-6">N. Shadbolt, T. Berners-Lee, and W. Hall. The Semantic Web Revisited. IEEE Intelligent Systems, 21(3):96–101, May 2006.</li>
<li id="cite-7">S. Siersdorfer and S. Sizov. Social recommender systems for web 2.0 folksonomies. ACM Press, New York, New York, USA, 2009.</li>
<li id="cite-8">M. Szomszor, C. Cattuto, H. Alani, K. OHara, A. Baldassarri, V. Loreto, and V. D. P. Servedio. Folksonomies, the Semantic Web, and Movie Recommendation. eprintsecssotonacuk, pages 71–84, 2007.</li>
</ol>
<div class="postscript">
I initially wrote this for my report, but thought this may make a good blog post, hence posting it over.
</div>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=oIvKbCKZOMU:zdw3C_lMb80:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=oIvKbCKZOMU:zdw3C_lMb80:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=oIvKbCKZOMU:zdw3C_lMb80:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=oIvKbCKZOMU:zdw3C_lMb80:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=oIvKbCKZOMU:zdw3C_lMb80:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=oIvKbCKZOMU:zdw3C_lMb80:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=oIvKbCKZOMU:zdw3C_lMb80:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=oIvKbCKZOMU:zdw3C_lMb80:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/oIvKbCKZOMU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/02/17/collaborative-tagging-folksonomy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/02/17/collaborative-tagging-folksonomy/</feedburner:origLink></item>
		<item>
		<title>Drafting my first progress report</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/qD8dhe9SE2w/</link>
		<comments>http://cslai.coolsilon.com/2011/01/09/drafting-my-first-progress-report/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 06:32:21 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Maintenance]]></category>
		<category><![CDATA[Semantic Web]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[RDF]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=199</guid>
		<description><![CDATA[Just managed to migrate all my blog sites to one centralized multi-site, so no more half-baked solution and hopefully this brings better plugin compatibility. I have not check with other related services (like Google Webmaster Tools) whether this cause any breakage though. Well, the main purpose of this blog post is actually a draft of [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/A1X-SwL9BU98FbttCGek_dqMoyg/0/da"><img src="http://feedads.g.doubleclick.net/~a/A1X-SwL9BU98FbttCGek_dqMoyg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/A1X-SwL9BU98FbttCGek_dqMoyg/1/da"><img src="http://feedads.g.doubleclick.net/~a/A1X-SwL9BU98FbttCGek_dqMoyg/1/di" border="0" ismap="true"></img></a></p><p>Just managed to <a href="http://www.clausconrad.com/blog/migrating-a-bunch-of-wordpress-blogs-to-a-single-wordpress-3-multi-site-installation">migrate</a> all my blog sites to one centralized multi-site, so no more <del datetime="2011-01-09T05:36:05+00:00">half-baked</del> solution and hopefully this brings better plugin compatibility. I have not check with other related services (like <a href="https://www.google.com/webmasters/tools/">Google Webmaster Tools</a>) whether this cause any breakage though. Well, the main purpose of this blog post is actually a draft of what I did for the past two months for my postgraduate programme. Yea, I should have posted more stuff to this blog (just realized that my last post here is already like half a year ago).</p>
<p><span id="more-199"></span></p>
<p>Long story short, I have been working on my research project two months ago. Throughout the mentioned time period, I basically spent a lot of time trying to read and understand some of the related topics in semantic web, information retrieval as well as machine learning as suggested by my supervisor.</p>
<p>I first started with revisiting <a href="http://cslai.coolsilon.com/2010/06/04/resource-definition-framework/">RDF</a> by putting more emphasis on how it is usually implemented. Yea, I know I did some when I was preparing my research proposal, but I didn&#8217;t go to the detail and skipped the section describing RDF/XML all together. </p>
<p>Recently there have been some debates on whether JSON should be used as  another data serialization format. I personally like JSON for its simplicity (especially comparing it to XML), but I find RDF/XML actually makes sense (read: good enough) because I find RDF is very URI dependent and it would probably be a bit awkward to see a lot of URI popping up in JSON. However, I am still very interested to see how this is sorted out, as <a href="http://www.w3.org/QA/2010/12/new_rdf_working_group_rdfjson.html">W3C initiated a group</a> to work on it. (Some thought-provoking read on this by <a href="http://webr3.org/blog/linked-data/opening-linked-data/">nathan@webr3</a>)</p>
<p>I have also read on RDFS for the first time and the more I read it, the more I find it related to my classes on AI (especially Prolog) in my Bachelor Degree. However, I am also slightly surprised to see how tolerant it is (leaving too much room for error?). Besides RDFS, I also read on OWL and find more similarity with Prolog (I really should post the summary of the readings here, yeah, too much to blog about, but lack of time and motivation).</p>
<p>What really surprised me was that with the combination of these (RDF, RDFS and OWL) technologies, I actually tried re-inventing the same thing for my last task in my previous job (over and over again). Although usage of RDF may not exactly fit the problem, but I feel it is close enough to solve the problem.</p>
<p>While looking for some articles on Linked Data Principle, I came across this <a href="http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html">TED talk</a> by <a href="http://www.w3.org/People/Berners-Lee/">Sir Tim-Berners-Lee</a>. Yeah, I do feel sorry for not publishing enough semantic data online after watching that, the talk was very motivating indeed (but is posting personal info that is machine readable without limit actually a good idea, I don&#8217;t feel like injecting a great portion of my life into social networking site, but that&#8217;s a different story).</p>
<p>I also read the beginner&#8217;s guide to SPARQL, and this is the real wow-factor to me. Although I don&#8217;t really like the SQL-like syntax, but the similarity to Prolog makes everything looks cool now. Yeah, I am pretty new in this, so I keep referring everything to Prolog XD. </p>
<p>Then I started to read on information retrieval, this is when everything suddenly seems not cool anymore. However, it did force me to do a lot of revision on statistics and some basic maths stuff (you will be surprised to see how much I forget after working for 2 years). And it wasn&#8217;t encouraging when I began to watch a video lecture on machine learning hoping to pick up in shorter time span because I find myself not understanding most of the lectures XD.</p>
<p>Yeah, that&#8217;s basically wraps up my progress for the past 2 months, getting myself excited with new stuff for the first month, and getting frustrated in the second month not able to understand the material.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=qD8dhe9SE2w:9uk6S2J718Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=qD8dhe9SE2w:9uk6S2J718Q:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=qD8dhe9SE2w:9uk6S2J718Q:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=qD8dhe9SE2w:9uk6S2J718Q:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=qD8dhe9SE2w:9uk6S2J718Q:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=qD8dhe9SE2w:9uk6S2J718Q:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=qD8dhe9SE2w:9uk6S2J718Q:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=qD8dhe9SE2w:9uk6S2J718Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/qD8dhe9SE2w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/01/09/drafting-my-first-progress-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/01/09/drafting-my-first-progress-report/</feedburner:origLink></item>
	</channel>
</rss>

