<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Mahound's Weblog</title>
	<link>http://weblog.zarquon.biz</link>
	<description>Religion, Computers and Fado</description>
	<pubDate>Mon, 30 Jun 2008 14:42:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Porcupine Tree - Porto, 8th Oct 2008</title>
		<link>http://weblog.zarquon.biz/index.php/2008/06/30/porcupine-tree-porto-8th-oct-2008/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/06/30/porcupine-tree-porto-8th-oct-2008/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 14:42:31 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[alternative]]></category>

		<category><![CDATA[awesome]]></category>

		<category><![CDATA[concert]]></category>

		<category><![CDATA[porcupine]]></category>

		<category><![CDATA[porcupine tree]]></category>

		<category><![CDATA[porto]]></category>

		<category><![CDATA[progressive]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/06/30/porcupine-tree-porto-8th-oct-2008/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://weblog.zarquon.biz/wp-content/uploads/2008/06/digitalizar0001.png" title="digitalizar0001.png"><img src="http://weblog.zarquon.biz/wp-content/uploads/2008/06/digitalizar0001.png" alt="digitalizar0001.png" height="113" width="273" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/06/30/porcupine-tree-porto-8th-oct-2008/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Poetry (1)</title>
		<link>http://weblog.zarquon.biz/index.php/2008/06/28/poetry-1/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/06/28/poetry-1/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 01:31:30 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[Religion]]></category>

		<category><![CDATA[abelard]]></category>

		<category><![CDATA[alexander]]></category>

		<category><![CDATA[divine]]></category>

		<category><![CDATA[eloisa]]></category>

		<category><![CDATA[erotic]]></category>

		<category><![CDATA[pope]]></category>

		<category><![CDATA[tragedy]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/06/28/poetry-1/</guid>
		<description><![CDATA[It&#8217;s probably nothing new for our British folks, but &#8220;Eloisa to Abelard&#8221; is one of the most amazing poems I&#8217;ve ever read. Divine, erotic and tragic: a perfect trinity that is fulfilled by this wonderful work by Alexander Pope.
 I come, I come! prepare your roseate bow&#8217;rs,
Celestial palms, and ever-blooming flow&#8217;rs.
Thither, where sinners may have [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s probably nothing new for our British folks, but &#8220;Eloisa to Abelard&#8221; is one of the most amazing poems I&#8217;ve ever read. Divine, erotic and tragic: a perfect trinity that is fulfilled by this wonderful work by Alexander Pope.</p>
<blockquote><p> <em>I come, I come! prepare your roseate bow&#8217;rs,<br />
Celestial palms, and ever-blooming flow&#8217;rs.<br />
Thither, where sinners may have rest, I go,<br />
Where flames refin&#8217;d in breasts seraphic glow:<br />
Thou, Abelard! the last sad office pay,<br />
And smooth my passage to the realms of day;<br />
See my lips tremble, and my eye-balls roll,<br />
Suck my last breath, and catch my flying soul!</em></p></blockquote>
<ul>
<li><a href="http://en.wikisource.org/wiki/Eloisa_to_Abelard">http://en.wikisource.org/wiki/Eloisa_to_Abelard </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/06/28/poetry-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DLPO scraping</title>
		<link>http://weblog.zarquon.biz/index.php/2008/05/01/dlpo-scraping/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/05/01/dlpo-scraping/#comments</comments>
		<pubDate>Thu, 01 May 2008 11:24:55 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[My stuff]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[dictionary]]></category>

		<category><![CDATA[dlpo]]></category>

		<category><![CDATA[html]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[scraping]]></category>

		<category><![CDATA[script]]></category>

		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/05/01/dlpo-scraping/</guid>
		<description><![CDATA[I&#8217;ve put up a code snippet that can be used as a shell script, in order to consult the DLPO (portuguese) dictionary. It&#8217;s a simple HTML scraping (html5lib + BeautifulSoup) example, but it&#8217;s really useful (at least for me).
Example:



mahound@magrathea ~ $ dlpo português



* adj.,



&#160; &#160; &#160; &#160; &#160;- relativo a Portugal;



&#160; &#160; &#160; &#160; &#160;- [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve put up a <a href="http://wiki.strigo.eu/Snips?action=AttachFile&amp;do=view&amp;target=dlpo.py">code snippet</a> that can be used as a shell script, in order to consult the <a href="http://www.priberam.pt/dlpo/" title="DLPO">DLPO</a> (portuguese) dictionary. It&#8217;s a simple HTML scraping (<a href="http://code.google.com/p/html5lib/" title="html5lib">html5lib</a> + <a href="http://www.crummy.com/software/BeautifulSoup/" title="BeautifulSoup">BeautifulSoup</a>) example, but it&#8217;s really useful (at least for me).</p>
<p>Example:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">mahound@magrathea ~ $ dlpo português
</div>
</li>
<li class="li1">
<div class="de1">* adj.,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- relativo a Portugal;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- diz-se de uma variedade de trigo-mole;
</div>
</li>
<li class="li2">
<div class="de2">* do Lat. portucalense
</div>
</li>
<li class="li1">
<div class="de1">* s. m.,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- indivíduo natural de Portugal;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- indivíduo que tem nacionalidade portuguesa;
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- língua falada pelos Portugueses, Brasileiros e todos os povos africanos de língua oficial portuguesa;
</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- antiga moeda de ouro.
</div>
</li>
<li class="li1">
<div class="de1">* fig.,
</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;- franco, leal, apesar de rude;
</div>
</li>
<li class="li1">
<div class="de1">mahound@magrathea ~ $</div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/05/01/dlpo-scraping/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mark V. Shaney</title>
		<link>http://weblog.zarquon.biz/index.php/2008/03/31/mark-v-shaney/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/03/31/mark-v-shaney/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 08:22:13 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[AI]]></category>

		<category><![CDATA[bot]]></category>

		<category><![CDATA[irc]]></category>

		<category><![CDATA[mark v shaney]]></category>

		<category><![CDATA[markov chains]]></category>

		<category><![CDATA[nslater]]></category>

		<category><![CDATA[turing test]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/03/31/mark-v-shaney/</guid>
		<description><![CDATA[Noah Slater called my attention to this:

http://en.wikipedia.org/wiki/Mark_V_Shaney 

He&#8217;s doing something similar, using an IRC bot. At first, it fooled me&#8230; it looked like a quite literate human on drugs.  Then, I started noticing some patterns, and eventually found out. However, I&#8217;m still kind of embarrassed about this&#8230; my faith on the Turing test has decreased, not [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bytesexual.org/about/" title="nslater">Noah Slater</a> called my attention to this:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Mark_V_Shaney" title="Mark V. Shaney">http://en.wikipedia.org/wiki/Mark_V_Shaney </a></li>
</ul>
<p>He&#8217;s doing something similar, using an IRC bot. At first, it fooled me&#8230; it looked like a quite literate human on drugs.  Then, I started noticing some patterns, and eventually found out. However, I&#8217;m still kind of embarrassed about this&#8230; my faith on the Turing test has decreased, not because machines are supposedly getting smarter, but rather because i start to believe that the conditions of a hypothetical &#8220;Turing test&#8221; should be more constrained than previously thought: i.e. the machine should convince the human that he&#8217;s talking with a sane and sober human being.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/03/31/mark-v-shaney/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Go, Yasi, go!</title>
		<link>http://weblog.zarquon.biz/index.php/2008/03/22/go-yasi-go/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/03/22/go-yasi-go/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 19:41:35 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[Music]]></category>

		<category><![CDATA[15yo]]></category>

		<category><![CDATA[guitar]]></category>

		<category><![CDATA[prodigy]]></category>

		<category><![CDATA[steve vai]]></category>

		<category><![CDATA[yasi]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/03/22/go-yasi-go/</guid>
		<description><![CDATA[15 year-old prodigy&#8230; no need to say more&#8230;



Oh, and she&#8217;s been playing for 3 years&#8230;
I guess I won&#8217;t touch a guitar again&#8230;
]]></description>
			<content:encoded><![CDATA[<p>15 year-old prodigy&#8230; no need to say more&#8230;</p>
<p><object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/QkczrJfMqF0&#038;hl=en"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/QkczrJfMqF0&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>Oh, and she&#8217;s been playing for 3 years&#8230;</p>
<p>I guess I won&#8217;t touch a guitar again&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/03/22/go-yasi-go/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OpenID</title>
		<link>http://weblog.zarquon.biz/index.php/2008/03/22/openid/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/03/22/openid/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 18:24:47 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[Society]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[centralization]]></category>

		<category><![CDATA[identity]]></category>

		<category><![CDATA[openid]]></category>

		<category><![CDATA[spam]]></category>

		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/03/22/openid/</guid>
		<description><![CDATA[Just added OpenID support to the weblog. I&#8217;ve disabled registration, so that everybody that doesn&#8217;t still have an account has to go through OpenID in order to login. I&#8217;m sick of phony users and spam bots&#8230;
If you don&#8217;t have an OpenID, create one&#8230; it&#8217;s quick, and it works for lots of websites.
]]></description>
			<content:encoded><![CDATA[<p>Just added OpenID support to the weblog. I&#8217;ve disabled registration, so that everybody that doesn&#8217;t still have an account has to go through OpenID in order to login. I&#8217;m sick of phony users and spam bots&#8230;</p>
<p>If you don&#8217;t have an OpenID, <a href="https://www.myopenid.com/" title="MyOpenID">create one</a>&#8230; it&#8217;s quick, and it works for <a href="http://openiddirectory.com/" title="Open ID Directory">lots of websites</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/03/22/openid/feed/</wfw:commentRss>
		</item>
		<item>
		<title>This morning&#8230;</title>
		<link>http://weblog.zarquon.biz/index.php/2008/03/21/this-morning/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/03/21/this-morning/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 11:13:10 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[My stuff]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[easter]]></category>

		<category><![CDATA[geneva]]></category>

		<category><![CDATA[morning]]></category>

		<category><![CDATA[snow]]></category>

		<category><![CDATA[st.genis-pouilly]]></category>

		<category><![CDATA[winter]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/03/21/this-morning/</guid>
		<description><![CDATA[The landscape in St. Genis-Pouilly(GEO:  46.245616, 6.028238) was like this:

]]></description>
			<content:encoded><![CDATA[<p>The landscape in St. Genis-Pouilly(<span class="geo">GEO:  <span class="latitude">46.245616</span>, <span class="longitude">6.028238</span></span>) was like this:</p>
<p><a href="http://zarquon.biz/~mahound/images/stgenis_snow.jpg" title="Snow in St. Genis-Pouilly 20080321"><img src="http://zarquon.biz/~mahound/images/stgenis_snow.jpg" alt="Snow in St. Genis, 20080321" width="335" height="251" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/03/21/this-morning/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Songs of Distant Earth</title>
		<link>http://weblog.zarquon.biz/index.php/2008/03/18/the-songs-of-distant-earth/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/03/18/the-songs-of-distant-earth/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 23:50:51 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[Music]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[Science]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[arthur c. clarke]]></category>

		<category><![CDATA[death]]></category>

		<category><![CDATA[literature]]></category>

		<category><![CDATA[mike oldfield]]></category>

		<category><![CDATA[sci-fi]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/03/18/the-songs-of-distant-earth/</guid>
		<description><![CDATA[Falling asleep to Mike Oldfield&#8217;s rendition&#8230;
R.I.P. Arthur C. Clarke (1917 - 2008).
]]></description>
			<content:encoded><![CDATA[<p>Falling asleep to Mike Oldfield&#8217;s rendition&#8230;</p>
<p>R.I.P. <a href="http://en.wikipedia.org/wiki/Arthur_C._Clarke" title="Arthur C. Clarke">Arthur C. Clarke</a> (1917 - 2008).</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/03/18/the-songs-of-distant-earth/feed/</wfw:commentRss>
		</item>
		<item>
		<title>We&#8217;re linked!</title>
		<link>http://weblog.zarquon.biz/index.php/2008/03/17/were-linked/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/03/17/were-linked/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 20:46:35 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[Semantic Web]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[foaf]]></category>

		<category><![CDATA[json]]></category>

		<category><![CDATA[linked data]]></category>

		<category><![CDATA[n3]]></category>

		<category><![CDATA[rdf]]></category>

		<category><![CDATA[sioc]]></category>

		<category><![CDATA[triples]]></category>

		<category><![CDATA[triplify]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/03/17/were-linked/</guid>
		<description><![CDATA[Yes, now this blog is part of the Linked Data community. Thanks to triplify, all the posts and comments contained in this blog can be exported as RDF (N3 or JSON-encoded). The source is http://weblog.zarquon.biz/triplify/ (default: N3, use http://weblog.zarquon.biz/triplify/?t-output=json for RDF/JSON).
The output is still a single graph (much like a dump), but I&#8217;m confident that [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, now this blog is part of the Linked Data community. Thanks to <a href="http://www.triplify.org" title="Triplify">triplify</a>, all the posts and comments contained in this blog can be exported as RDF (N3 or JSON-encoded). The source is <a href="http://weblog.zarquon.biz/triplify/">http://weblog.zarquon.biz/triplify/</a> (default: N3, use <a href="http://weblog.zarquon.biz/triplify/?t-output=json">http://weblog.zarquon.biz/triplify/?t-output=json</a> for RDF/JSON).</p>
<p>The output is still a single graph (much like a dump), but I&#8217;m confident that the triplify guys will soon start using different contexts, and make the URIs browsable.  In any case, it&#8217;s already possible to link these data with, i.e. FOAF info, using  <a href="http://xmlns.com/foaf/spec/#term_mbox_sha1sum" title="foaf:mbox_sha1sum">foaf:mbox_sha1sum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/03/17/were-linked/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Contexts in rdflib</title>
		<link>http://weblog.zarquon.biz/index.php/2008/02/29/contexts-in-rdflib-2/</link>
		<comments>http://weblog.zarquon.biz/index.php/2008/02/29/contexts-in-rdflib-2/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 19:56:32 +0000</pubDate>
		<dc:creator>Mahound</dc:creator>
		
		<category><![CDATA[Semantic Web]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[contexts]]></category>

		<category><![CDATA[graphs]]></category>

		<category><![CDATA[rdflib]]></category>

		<guid isPermaLink="false">http://weblog.zarquon.biz/index.php/2008/02/29/contexts-in-rdflib-2/</guid>
		<description><![CDATA[A short example&#8230;



from rdflib import Namespace, BNode, Literal, URIRef


from rdflib.Graph import Graph, ConjunctiveGraph


from rdflib.store.IOMemory import IOMemory


&#160;


ns = Namespace&#40;&#34;http://love.com#&#34;&#41;


&#160;


mary = URIRef&#40;&#34;http://love.com/lovers/mary#&#34;&#41;


john = URIRef&#40;&#34;http://love.com/lovers/john#&#34;&#41;


&#160;


cmary=URIRef&#40;&#34;http://love.com/lovers/mary#&#34;&#41;


cjohn=URIRef&#40;&#34;http://love.com/lovers/john#&#34;&#41;


&#160;


store = IOMemory&#40;&#41;


&#160;


g = ConjunctiveGraph&#40;store=store&#41;


g.bind&#40;&#34;love&#34;,ns&#41;


&#160;


gmary = Graph&#40;store=store, identifier=cmary&#41;


&#160;


gmary.add&#40;&#40;mary, ns&#91;&#8216;hasName&#8217;&#93;, Literal&#40;&#34;Mary&#34;&#41;&#41;&#41;


gmary.add&#40;&#40;mary, ns&#91;&#8216;loves&#8217;&#93;, john&#41;&#41;


&#160;


gjohn = Graph&#40;store=store, identifier=cjohn&#41;


gjohn.add&#40;&#40;john, ns&#91;&#8216;hasName&#8217;&#93;, Literal&#40;&#34;John&#34;&#41;&#41;&#41;


&#160;


#enumerate contexts


for c in g.contexts&#40;&#41;:


&#160; &#160; print &#34;&#8212;- %s &#34; % c


&#160;


#separate graphs


print gjohn.serialize&#40;format=&#8216;n3&#8242;&#41;


print gmary.serialize&#40;format=&#8216;n3&#8242;&#41;


&#160;


#full graph


print g.serialize&#40;format=&#8216;n3&#8242;&#41;



]]></description>
			<content:encoded><![CDATA[<p>A short example&#8230;</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">from</span> rdflib <span class="kw1">import</span> Namespace, BNode, Literal, URIRef</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">from</span> rdflib.<span class="me1">Graph</span> <span class="kw1">import</span> Graph, ConjunctiveGraph</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">from</span> rdflib.<span class="me1">store</span>.<span class="me1">IOMemory</span> <span class="kw1">import</span> IOMemory</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">ns = Namespace<span class="br0">&#40;</span><span class="st0">&quot;http://love.com#&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">mary = URIRef<span class="br0">&#40;</span><span class="st0">&quot;http://love.com/lovers/mary#&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">john = URIRef<span class="br0">&#40;</span><span class="st0">&quot;http://love.com/lovers/john#&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">cmary=URIRef<span class="br0">&#40;</span><span class="st0">&quot;http://love.com/lovers/mary#&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">cjohn=URIRef<span class="br0">&#40;</span><span class="st0">&quot;http://love.com/lovers/john#&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">store = IOMemory<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">g = ConjunctiveGraph<span class="br0">&#40;</span>store=store<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">g.<span class="me1">bind</span><span class="br0">&#40;</span><span class="st0">&quot;love&quot;</span>,ns<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">gmary = Graph<span class="br0">&#40;</span>store=store, identifier=cmary<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">gmary.<span class="me1">add</span><span class="br0">&#40;</span><span class="br0">&#40;</span>mary, ns<span class="br0">&#91;</span><span class="st0">&#8216;hasName&#8217;</span><span class="br0">&#93;</span>, Literal<span class="br0">&#40;</span><span class="st0">&quot;Mary&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">gmary.<span class="me1">add</span><span class="br0">&#40;</span><span class="br0">&#40;</span>mary, ns<span class="br0">&#91;</span><span class="st0">&#8216;loves&#8217;</span><span class="br0">&#93;</span>, john<span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">gjohn = Graph<span class="br0">&#40;</span>store=store, identifier=cjohn<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">gjohn.<span class="me1">add</span><span class="br0">&#40;</span><span class="br0">&#40;</span>john, ns<span class="br0">&#91;</span><span class="st0">&#8216;hasName&#8217;</span><span class="br0">&#93;</span>, Literal<span class="br0">&#40;</span><span class="st0">&quot;John&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">#enumerate contexts</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span> c <span class="kw1">in</span> g.<span class="me1">contexts</span><span class="br0">&#40;</span><span class="br0">&#41;</span>:</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">print</span> <span class="st0">&quot;&#8212;- %s &quot;</span> % c</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="co1">#separate graphs</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">print</span> gjohn.<span class="me1">serialize</span><span class="br0">&#40;</span>format=<span class="st0">&#8216;n3&#8242;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">print</span> gmary.<span class="me1">serialize</span><span class="br0">&#40;</span>format=<span class="st0">&#8216;n3&#8242;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">#full graph</span></div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">print</span> g.<span class="me1">serialize</span><span class="br0">&#40;</span>format=<span class="st0">&#8216;n3&#8242;</span><span class="br0">&#41;</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://weblog.zarquon.biz/index.php/2008/02/29/contexts-in-rdflib-2/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
