26 January 2010


It's 00H25 here, and while one of my programs is aligning some SNPs on the human genome, I'm going to describe the tiny tool I wrote this Week-end. QuoteEditor is a java editor used to store some famous quotes in a RDF/XML file. The java 'jar' and the documentation are available at :



java -jar lindenb/build/quotes.jar [-f <rdf-file> ]
the optional parameter '-f' is the name of the XML/RDF file where the quotes will be added. If this file does not exists, it will be created by QuoteEditor (default is ~/quotes.rdf )

The Interface

  • Author: must be a URL or a name that must be resolved in wikipedia. For example 'Victor Hugo' will be resolved as http://en.wikipedia.org/wiki/Victor_Hugo
  • Source: a free text. The source of the quote
  • Date: a free text: A date for this quote
  • Keywords: one or more keywords ( or URL ) , space delimited. Each keyword must be resolved as a Category in wikipedia. For example Scientists will be resolved as http://en.wikipedia.org/wiki/Category:Scientists
  • Quote Source: a free text. Where this quote was found
  • lang: the language for this quote

each time a new quote is saved it will be added at the end of the rdf-file.


Here is an example of RDF/XML file generated by QuoteEditor:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:q="urn:ontology:quotes:">
<q:quote xml:lang="fr">L'œil était dans la tombe et regardait Caïn.</q:quote>
<q:author rdf:resource="http://en.wikipedia.org/wiki/Victor Hugo"/>
<q:source>La Conscience, from La Légende des siècles (1859),</q:source>
<q:subject rdf:resource="http://en.wikipedia.org/wiki/Category:Murders"/>
<q:subject rdf:resource="http://en.wikipedia.org/wiki/Remorse"/>
<q:subject rdf:resource="http://en.wikipedia.org/wiki/Category:Emotions"/>
<q:quote xml:lang="fr">Des mouches pour des enfants espiègles, voilà ce que nous sommes pour les Dieux ;
Ils nous tuent pour se divertir.</q:quote>
<q:author rdf:resource="http://en.wikipedia.org/wiki/William Shakespeare"/>
<q:source>Le Roi Lear (1605), William Shakespeare</q:source>
<q:subject rdf:resource="http://en.wikipedia.org/wiki/Category:God"/>
<q:subject rdf:resource="http://en.wikipedia.org/wiki/Category:Crimes"/>
<q:subject rdf:resource="http://en.wikipedia.org/wiki/Category:Flies"/>
<q:subject rdf:resource="http://en.wikipedia.org/wiki/Category:Recreation"/>

That's it

PS: Hum, my program mapping the SNPs is still running... 200Mo generated so far...


retobg said...

Hi, just about to write somtehing similar I looked around what there is already.

Why are you sing your own ontology, why not dc:subject and dc:creator?


Pierre Lindenbaum said...

I use my own ontology because the range of dc:subject/creator can be a literal and I wanted a URI.

retobg said...

There is dcterm:creator which has a more limited range, and as far as I know using dc:subject is the standard way for skos-tagging.

I just came across http://purl.org/ontology/bibo/ which could also be used to describe quotes, see http://groups.google.com/group/bibliographic-ontology-specification-group/browse_thread/thread/369df8ce47ee9653 for examples.

Pierre Lindenbaum said...

@retbog, thank you about comments. The most important here was to save the quotes. In the futyre, I will be able to easily change the ontology using XLST.