15 November 2009

600 years of paintings: Part 1

It's a lazy sunday, It's raining, it's dark, it's cold.. so I'm playing with the mediawiki API, wikipedia commons and some of my programs to fetch one painting per year since the 15th century. Here is the script:

JE=je-4.0.71.jar:
API=http://commons.wikimedia.org/w/api.php

echo "<div style='background-color:black;color:white; margin:50px; padding:50px;'>";
for CENTURY in `seq 14 19`
do
echo "<h2>${CENTURY}th century.</h2><div style='display: table;'>";
for YEAR in `seq 00 99`
do
Y=`printf "%02d" $YEAR`
java -cp ${JE}:wpsubcat.jar org.lindenb.mwtools.WPSubCat -api ${API} -d 1 -ns 6 -add "Category:${CENTURY}${Y}_paintings" -log-level OFF |\
grep -v "Category" |\
shuf |\
head -n1 |\
java -jar wpimages.jar -api ${API} -w 150 -H 150 -log-level OFF |\
gawk -F ' ' '{ name=substr($1,6);
printf("<span><div><a href=\"http://commons.wikimedia.org/wiki/%s\"><img src=\"%s\" alt=\"%s\" title=\"%s\" style=\"border: none;\"/></a><br/><b>__DATE__</b><br/>%s</div></span>\n",$1,$9,name,name,substr(name,1,20));
}'|\
sed "s/__DATE__/$CENTURY$Y/"
done
echo "</div>";
done
echo "</div>";




15th century.

Ottaviano Nelli - Madona com o Menino e Santos.jpg
1400
Ottaviano Nelli - Ma
Conrad von Soest 002.jpg
1403
Conrad von Soest 002
Don Lorenzo Monaco 008.jpg
1404
Don Lorenzo Monaco 0
Апостол Пётр.jpg
1405
Апостол Пётр.jpg
Don Lorenzo Monaco 003.jpg
1408
Don Lorenzo Monaco 0
Lorenzo Monaco Geburt Christi.jpg
1409
Lorenzo Monaco Gebur
Luis Borrassá 001.jpg
1411
Luis Borrassá 001.jp
Don Lorenzo Monaco 012.jpg
1413
Don Lorenzo Monaco 0
Don Lorenzo Monaco 011.jpg
1414
Don Lorenzo Monaco 0
Meister des Marschalls von Boucicaut-Die Geschichte von Adam und Eva.jpg
1415
Meister des Marschal
Henri Bellechose 001.jpg
1416
Henri Bellechose 001
Gentile da Fabriano 035.jpg
1425
Gentile da Fabriano
Crucifix Masaccio.jpg
1426
Crucifix Masaccio.jp
Meister Francke 004.jpg
1430
Meister Francke 004.
Lucas Moser 001.jpg
1431
Lucas Moser 001.jpg
Ghent Altarpiece A - Cain - Abel - sacrifice.jpg
1432
Ghent Altarpiece A -
DOMENICO DI BARTOLO.jpg
1433
DOMENICO DI BARTOLO.
Jan van Eyck 006.jpg
1434
Jan van Eyck 006.jpg
Jan van Eyck 071.jpg
1435
Jan van Eyck 071.jpg
Fra Angelico 076.jpg
1436
Fra Angelico 076.jpg
Hans Multscher 002.jpg
1437
Hans Multscher 002.j
Robert Campin 015.jpg
1438
Robert Campin 015.jp
Jan van Eyck 086.jpg
1439
Jan van Eyck 086.jpg
Bischofshofen Frauenkirche - Fresco Jüngstes Gericht 1.jpg
1440
Bischofshofen Frauen
Pisanello 015.jpg
1441
Pisanello 015.jpg
Pellegrinaio Santa Maria della Scala n4 detail.jpg
1442
Pellegrinaio Santa M
Konrad Witz 009.jpg
1444
Konrad Witz 009.jpg
St Bernardino preaching in the Campo.Sano di Pietro.jpg
1445
St Bernardino preach
Petrus Christus 007.jpg
1446
Petrus Christus 007.
Castagno, Andrea del - Last Supper - 1447.jpg
1447
Castagno, Andrea del
Christus saint eloi orfèvre.jpg
1449
Christus saint eloi
VersammlungdesSt.Michael-OrdensFouquet1470.jpg
1450
VersammlungdesSt.Mic
Enguerrand Charonton 002.jpg
1452
Enguerrand Charonton
Enguerrand Charonton 001.jpg
1454
Enguerrand Charonton
Andrea Mantegna 037.jpg
1455
Andrea Mantegna 037.
Johann Koerbecke Tempelgang Mariens.jpg
1457
Johann Koerbecke Tem
BoutsErasmus.jpg
1458
BoutsErasmus.jpg
Andrea Mantegna 022.jpg
1459
Andrea Mantegna 022.
Paolo Uccello 038.jpg
1460
Paolo Uccello 038.jp
Neri di Bicci - Couronnement de la Vierge.jpg
1461
Neri di Bicci - Cour
Giovanni Bellini - Tryptych of St Sebastian.jpg
1464
Giovanni Bellini - T
MantegnaPresentazione.jpg
1465
MantegnaPresentazion
Andrea Mantegna 110.jpg
1466
Andrea Mantegna 110.
Carlo Crivelli 025.jpg
1468
Carlo Crivelli 025.j
Sandro Botticelli 062.jpg
1469
Sandro Botticelli 06
Alesso Baldovinetti 001.jpg
1470
Alesso Baldovinetti
Saint Terence of Pesaro.jpg
1471
Saint Terence of Pes
Hans Memling 037.jpg
1472
Hans Memling 037.jpg
Martin Schongauer 003.jpg
1473
Martin Schongauer 00
Antonello da Messina 003.jpg
1474
Antonello da Messina
Antonello da Messina 035.jpg
1475
Antonello da Messina
Antonello da Messina 022.jpg
1476
Antonello da Messina
Carlo Crivelli 010.jpg
1477
Carlo Crivelli 010.j
Leonardo da Vinci 037.jpg
1478
Leonardo da Vinci 03
Hans Memling 065.jpg
1479
Hans Memling 065.jpg
Hans Memling 030.jpg
1480
Hans Memling 030.jpg
Sankt Wolfgang Kirche - Pacheraltar Darbringung im Tempel 3.jpg
1481
Sankt Wolfgang Kirch
Carlo Crivelli 032.jpg
1482
Carlo Crivelli 032.j
Venus and Mars.jpg
1483
Venus and Mars.jpg
Hans Memling 070.jpg
1484
Hans Memling 070.jpg
Saint Demetrius of Thessaloniki from Church of the Deposition from Borodava - 1485.jpg
1485
Saint Demetrius of T
Carlo Crivelli 072.jpg
1486
Carlo Crivelli 072.j
Sandro Botticelli 076.jpg
1487
Sandro Botticelli 07
Giovanna Tornabuoni full length.jpg
1488
Giovanna Tornabuoni
Hans Memling 074.jpg
1489
Hans Memling 074.jpg
Lorenzo Costa 002.jpg
1490
Lorenzo Costa 002.jp
Hans Memling 002.jpg
1491
Hans Memling 002.jpg
Ghirlandaio Christ in Heaven with Four Saints and a Donor.jpg
1492
Ghirlandaio Christ i
Hans Holbein d. Ä. 008.jpg
1493
Hans Holbein d. Ä. 0
Pietro Perugino 067.jpg
1494
Pietro Perugino 067.
Vittore Carpaccio 046.jpg
1495
Vittore Carpaccio 04
Albrecht Dürer 054.jpg
1496
Albrecht Dürer 054.j
Andrea Mantegna 106.jpg
1497
Andrea Mantegna 106.
05self26.jpg
1498
05self26.jpg
Dürer Oswolt Krel.jpg
1499
Dürer Oswolt Krel.jp

09 November 2009

Building a simple Expression language with JJTree/Javacc . My Notebook

Last year, I described how to use the JAVACC a parser/scanner generator for java. This WE, I've played with JJTREE: JJTree is a preprocessor for JavaCC that inserts parse tree building actions at various places in the JavaCC source.. Here I describe how to build a simple expression language to find an object in a simple 'JSON 'object only built with arrays, java.util.List, java.util.Map, String, etc... . For example: exectuting a[5].year on {"d":12345, "b":null, "c":false, "a":["Hello", "World", true, false, null, {"name":"Pierre", "year":2009}]} would return: 2009

The JSONPath.jjt header


options {
/** create a pure parser */
STATIC=false;
DEBUG_PARSER=false;
ERROR_REPORTING=true;
NODE_USES_PARSER=false;
/** this class will build the nodes, must implement:"static SimpleNode JSONPathCompiler.jjtCreate(int id)" */
NODE_FACTORY="JSONPathCompiler";
/** The node of the Abstract Syntax Tree will extend this class */
NODE_CLASS="JSONNode";
}

The tokens


Defines the regular expressions to be recognized by the lexer.
TOKEN: {
<#LETTER: ["_","a"-"z","A"-"Z"] >
| <#DIGIT: ["0"-"9"] >
| <DOT: ".">
| <INTEGER: <DIGIT> (<DIGIT>)* >
| <IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)*>
| <OPEN_ARRAY: "[">
| <CLOSE_ARRAY: "]">
}

The grammar


An expression is at least an 'object' or an 'array' followed by any number of 'objects' or 'arrays'. '#EXPRESSION' means that we want this node to be named 'JJTEXPRESSION' instead of the default, 'JJTexpr'. This expression with return a JSONNode.
JSONNode expr() #EXPRESSION:{}
{
(array() | object() ) ( array() | <DOT> object() )* <EOF>
{
/** jjtThis is the current AST node */
return jjtThis;
}
}
An array is an integer surrounded by two brackets. The AST node created by Javacc contains an object called 'value' holding whatever your want (here, the value of the index ).
void array() #ARRAY:{Token i;}
{
<OPEN_ARRAY> i=<INTEGER> <CLOSE_ARRAY>
{
jjtThis.value=new Integer(i.image);
}
}
An object/map is just a name.
void object() #OBJECT: { Token name;}
{
( name=<IDENTIFIER> )
{
jjtThis.value= name.image;
}
}

The Custom AST node

By default, all the node are an instance of the class SimpleNode generated by JJTree. Here, I've choosen to use a custom node extending SimpleNode.
public static class JSONNode
extends SimpleNode
{
JSONNode(int i)
{
super(i);
}
(...)
}

static SimpleNode jjtCreate(int id)
{
return new JSONNode(id);
}
(...)

Implementing the expression language


The method 'eval' will implement the expression language itself. For example, a node of type "JJTEXPRESSION:" will get the values of its children, a node of type "JJTARRAY" will test if the object is a list or an array and will use the index stored in value to retrieve the indexed data.
public Object eval(Object o)
{
if(o==null) return null;
switch(this.id)
{
case JJTEXPRESSION:
{
if(getChildrenCount()==0) return null;
for(int i=0;o!=null && i< getChildrenCount();++i)
{
o=at(i).eval(o);
}
return o;
}
case JJTARRAY:
{
int index= Integer.class.cast(this.value);
if(o instanceof java.util.List)
{
java.util.List L=java.util.List.class.cast(o);
if(index<0 || index>= L.size()) return null;
return L.get(index);
}
else if(o.getClass().isArray())
{
Object L[]=(Object[])o;
if(index<0 || index>= L.length) return null;
return L[index];
}
return null;
}
case JJTOBJECT:
{
if(o instanceof java.util.Map)
{
java.util.Map M=java.util.Map.class.cast(o);
return M.get(this.value);
}
return null;
}

default:return null;
}
}


Compiling Testing


$(JCC)/jjtree JSONPath.jjt
$(JCC)/javacc JSONPath.jj
javac JSONPathCompiler.java
java JSONPathCompiler <expression>

Results


Compiling a[5]
Eval {"d":12345, "b":null, "c":false, "a":["Hello", "World", true, false, null, {"name":"Pierre", "year":2009}]}
Result is:{name=Pierre, year=2009}

Compiling a[1]
Eval {"d":12345, "b":null, "c":false, "a":["Hello", "World", true, false, null, {"name":"Pierre", "year":2009}]}
Result is:World

Compiling a[1][3][0]
Eval {"d":12345, "b":null, "c":false, "a":["Hello", "World", true, false, null, {"name":"Pierre", "year":2009}]}
Result is:null

Compiling d
Eval {"d":12345, "b":null, "c":false, "a":["Hello", "World", true, false, null, {"name":"Pierre", "year":2009}]}
Result is:12345

Compiling a[5].year
Eval {"d":12345, "b":null, "c":false, "a":["Hello", "World", true, false, null, {"name":"Pierre", "year":2009}]}
Result is:2009

Compiling x.y
Eval {"d":12345, "b":null, "c":false, "a":["Hello", "World", true, false, null, {"name":"Pierre", "year":2009}]}
Result is:null


Full source code


options {
STATIC=false;
DEBUG_PARSER=false;
ERROR_REPORTING=true;
NODE_USES_PARSER=false;
NODE_FACTORY="JSONPathCompiler";
NODE_CLASS="JSONNode";
}

PARSER_BEGIN(JSONPathCompiler)
import java.lang.reflect.*;

public class JSONPathCompiler
{
public static class JSONNode
extends SimpleNode
{
JSONNode(int i)
{
super(i);
}

public int getChildrenCount()
{
return this.children==null?0:children.length;
}

public JSONNode at(int index)
{
return (JSONNode)(
this.children==null ||
index<0 ||
index>=this.children.length ?
null:
this.children[index]
);
}

public String getName()
{
return JSONPathCompilerTreeConstants.jjtNodeName[this.id];
}

public void dump(String prefix)
{
System.out.println(prefix+toString());
if( children!=null && children.length>0)
{
System.out.println(prefix+" [");
for (int i = 0; children!=null && i < children.length; ++i)
{
System.out.print(prefix+" ("+(i+1)+")");
SimpleNode c= (SimpleNode)children[i];
if(c==null)
{
System.out.println("null");
}
else
{
c.dump(prefix+" ");
}
}
System.out.println(prefix+" ]");
}
}



public Object eval(Object o)
{
if(o==null) return null;
switch(this.id)
{
case JJTEXPRESSION:
{
if(getChildrenCount()==0) return null;
for(int i=0;o!=null && i< getChildrenCount();++i)
{
o=at(i).eval(o);
}
return o;
}
case JJTARRAY:
{
int index= Integer.class.cast(this.value);
if(o instanceof java.util.List)
{
java.util.List L=java.util.List.class.cast(o);
if(index<0 || index>= L.size()) return null;
return L.get(index);
}
else if(o.getClass().isArray())
{
Object L[]=(Object[])o;
if(index<0 || index>= L.length) return null;
return L[index];
}
return null;
}
case JJTOBJECT:
{
if(o instanceof java.util.Map)
{
java.util.Map M=java.util.Map.class.cast(o);
return M.get(this.value);
}
return null;
}

default:
System.err.println("Doesn't handle "+this.id);
break;
}
return null;
}
}



static SimpleNode jjtCreate(int id)
{
return new JSONNode(id);
}

public static void main(String args[])
{
try
{
java.io.StringReader r= new java.io.StringReader(args[0]);
JSONPathCompiler app= new JSONPathCompiler(r);
JSONNode x=JSONNode.class.cast(app.expr());
//x.dump("[xpath]");
java.util.Map<String,Object> o1=new java.util.HashMap<String,Object>();
java.util.HashMap o2=new java.util.HashMap<String,Object>();
java.util.List<Object> o3=new java.util.ArrayList<Object>();

o1.put("a",o3);
o1.put("b",null);
o1.put("c",Boolean.FALSE);
o1.put("d",12345);

o3.add("Hello");
o3.add("World");
o3.add(Boolean.TRUE);
o3.add(Boolean.FALSE);
o3.add(null);
o3.add(o2);

o2.put("name","Pierre");
o2.put("year",2009);

Object o=x.eval(o1);
System.err.println("Compiling <code>"+args[0]+"</code>");
System.err.println("Eval <code>"+o1+"</code>");
System.err.println("Result is:<code>"+o+"</code>");
}
catch(Exception err)
{
err.printStackTrace();
}
}
}
PARSER_END(JSONPathCompiler)

SKIP :
{
" "
| "\t"
| "\n"
| "\r"
}

TOKEN: {
<#LETTER: ["_","a"-"z","A"-"Z"] >
| <#DIGIT: ["0"-"9"] >
| <DOT: ".">
| <INTEGER: <DIGIT> (<DIGIT>)* >
| <IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)*>
| <OPEN_ARRAY: "[">
| <CLOSE_ARRAY: "]">
}



JSONNode expr() #EXPRESSION:{}
{
(array() | object() ) ( array() | <DOT> object() )* <EOF>
{
return jjtThis;
}
}

void array() #ARRAY:{Token i;}
{
<OPEN_ARRAY> i=<INTEGER> <CLOSE_ARRAY>
{
jjtThis.value=new Integer(i.image);
}
}

void object() #OBJECT: { Token name;}
{
( name=<IDENTIFIER> )
{
jjtThis.value= name.image;
}
}

That's it.
Pierre

06 November 2009

My PDFs anywhere.

A short post: I was asked to write a web server to allow people access their PDFs when they are away from the laboratory. People enter a Doi, a PMID or the URL of the page and the system tries to retrieve the PDF using a set of pre-defined patterns (e.g. the PDF of http://www.pnas.org/content/X/Y/Z is http://www.pnas.org/content/X/Y/Z.full.pdf ). This idea was suggested by Chris Miller on FriendFeed. I've also included a Bookmarklet identifying the current page or the text selected and invoking the web server. The server looks like this:

Password required


Examples


This bookmarklet will bring up a new window containing the 'fetchpdf' form from any page on the Web:GetPDF

Of course, I cannot give the URL of my server, but the source code is available here:


That's it
Pierre

Handling RDF Statements with Apache Velocity

This post is about using Apache Velocity ( a Java-based template engine ) and the Jena RDF library. My aim was to use Velocity to handle the content of one or more RDF store without compiling, just by using a custom velocity template. This idea was much inspired by Egon Willighagen's posts where the RDF was handled with a scripting engine embedded in bioclipse. It also seems that I'm not the first who had this idea of using Velocity+RDF: see [here].
OK, my experimental source code for the program JenaVelocity is available here:

Describing the RDFstores


On the command line, one (or more) RDF dataset is described as a JSON document. In the following example this is a remote file, but it could also be the description of a persistent database, a N3 file, etc... This RDF file will also be used later for resolving some names from the bio2rdf repository, this is why I also added a table for the prefix mappings. This RDF model will be inserted in the VelocityContext under the name "$store1"
[
{
"name": "store1",
"url":"http://www.lri.fr/~pietriga/foaf.rdf",
"prefix-mapping":{
"uniprot":"http://bio2rdf.org/uniprot:"
}
}
]

Example 1

In the following example: all the RDFstores are inserted in the VelocityContext as $rdfstores. For each rdfstore a HTML list is created. The list contains the names of all the infividuals of the FOAF file described previously.
<html><body>
#set($RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#")
#set($FOAF="http://xmlns.com/foaf/0.1/")
<h1>Staff</h1>
<ul>
#foreach($store in $rdfstores)
#set($pred = ${store.model.createProperty("${FOAF}","name")})
#foreach($stmt in
${store.model.listStatements(null,${store.model.createProperty("${FOAF}","name")},null,null)})
<li>${stmt.object.string}</li>
#end
</ul></body></html>

After running JenaVelocity, I got the following result:

Staff



  • Jean-Daniel Fekete

  • Chris Bizer

  • Caroline Appert

  • Ralph Swick

  • Vincent Quint

  • Jean-Yves Vion-Dury

  • Yves Guiard

  • Eric Miller

  • Renaud Blanch

  • Emmanuel Pietriga

  • Jose Kahan

  • Eric Prud'hommeaux

  • Catherine Letondal

  • Olivier Chapuis

  • Michel Beaudouin-Lafon

  • Nicolas Roussel

  • Ryan Lee

  • Wendy Mackay

Example 2


Here, I've inserted an object called $sparql in the VelocityContext. This object is used to send a SPARQL query to the bio2rdf sparql endpoint and the Statements related to the rdf:type http://bio2rdf.org/ns/uniprot:Strain are fetched and displayed in a HTML table. For each Resource, we try to get a short form of its URI using our previously defined $store1. It the object of a statement is a literal, the quoted string is printed.
<html><body>
#set($RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#")
#set($FOAF="http://xmlns.com/foaf/0.1/")
<h1>Strains</h1>
<table>
#foreach($row in
$sparql.select("http://quebec.bio2rdf.org/sparql","select distinct ?s
?p ?o where { ?s a <http://bio2rdf.org/ns/uniprot:Strain> . ?s ?p ?o}
LIMIT 100
"))
<tr>
<td><a href="${row.get("s").getURI()}">${store1.shortForm(${row.get("s").getURI()})}</a></td>
<td><a href="${row.get("p").getURI()}">${store1.shortForm(${row.get("p").getURI()})}</a></td>
<td>#if(${row.get("o").isResource()})
<a href="${row.get("o").getURI()}">${store1.shortForm(${row.get("o").getURI()})}</a>
#else
<span>"$row.get("o").string"</span>
#end</td>
</tr>
#end
</table>
#end
</body></html>

After running JenaVelocity, I got the following result:

Strains

uniprot:Q8C7G5_5rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7G5_5dc:title"C57BL/6J"
uniprot:Q8C7G5_8rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7G5_8dc:title"FVB/N"
uniprot:Q8C7H1_2rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7H1_2dc:title"C57BL/6J"
uniprot:Q8C7K6_2rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7K6_2dc:title"C57BL/6J"
uniprot:Q8C7K6_5rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7K6_5dc:title"C57BL/6"
uniprot:Q8C7M3_2rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7M3_2dc:title"C57BL/6J"
uniprot:Q8C7M3_Ardf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7M3_Adc:title"C57BL/6"
uniprot:Q8C7N7_2rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7N7_2dc:title"C57BL/6J"
uniprot:Q8C7N7_3rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7N7_3dc:title"NOD"
uniprot:Q8C7N7_7rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7N7_7dc:title"C57BL/6"
uniprot:Q8C7Q4_3rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7Q4_3dc:title"C57BL/6J"
uniprot:Q8C7R4_2rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7R4_2dc:title"C57BL/6J"
uniprot:Q8C7R4_5rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7R4_5dc:title"C57BL/6"
uniprot:Q8C7U1_2rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7U1_2dc:title"C57BL/6J"
uniprot:Q8C7U1_3rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7U1_3dc:title"NOD"
uniprot:Q8C7U1_7rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7U1_7dc:title"FVB/N"
uniprot:Q8C7U7_4rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7U7_4dc:title"C57BL/6J"
uniprot:Q8C7U7_5rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7U7_5dc:title"NOD"
uniprot:Q8C7V3_4rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7V3_4dc:title"C57BL/6J"
uniprot:Q8C7V3_7rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7V3_7dc:title"C57BL/6"
uniprot:Q8C7V8_2rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7V8_2dc:title"C57BL/6J"
uniprot:Q8C7V8_3rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7V8_3dc:title"NOD"
uniprot:Q8C7V8_8rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7V8_8dc:title"C57BL/6"
uniprot:Q8C7W7_2rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7W7_2dc:title"C57BL/6J"
uniprot:Q8C7W7_3rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7W7_3dc:title"NOD"
uniprot:Q8C7W7_8rdf:typehttp://bio2rdf.org/ns/uniprot:Strain
uniprot:Q8C7W7_8dc:title"Czech II"
(...)(...)(...)


Conclusion: Velocity templates allow to handle and render some RDF data without compiling anything. However, a prior knowledge of the Jena API is required.

That's it.

Pierre

13 October 2009

My contribution to Wikipedia

In reply to Duncan Hull, here are the articles I've created on wikipedia since 2006. At the beginning, I copied the abstracts in pubmed which led to some copyright problems.

(See also this older post : Leonard Colebrook: Creating a Biography in Wikipedia).

  1. Abel-Dominique Boyé
  2. Abu ul-Ala Shirazi
  3. Adam Zamenhof
  4. Alan Lyell
  5. Albéric Pont
  6. Albert Lilius
  7. Alexander Langmuir
  8. Alfonso Giacomo Gaspare Corti
  9. Alfred Francois Donné
  10. Alfred Jost
  11. Alfred Kohn
  12. Alfred Vogt
  13. Alice Magaw
  14. Amanz Gressly
  15. Anal. Biochem.
  16. Analytical Biochemistry (journal)
  17. Anatomischer Anzeiger
  18. André Blondel
  19. Annales d'histochimie
  20. Annales médico-psychologiques
  21. Annales pharmaceutiques françaises
  22. Anne Anastasi
  23. Ann. Thorac. Surg.
  24. Antoine Béclère
  25. Antonio Filippo Ciucci
  26. Archives of natural history
  27. Arthur Ernest Guedel
  28. Arthur Norman Exton-Smith
  29. Augusta Déjerine-Klumpke
  30. Augusta Marie Klumpke
  31. Brain and cognition
  32. British journal of mathematical and statistical psychology
  33. British medical journal
  34. Bronisław Hager
  35. Bulletin of the history of medicine
  36. Carl Franz Robinow
  37. Category:American virologists
  38. Category:Australian virologists
  39. Category:French virologists
  40. Category:Italian ophthalmologists
  41. Category:TPR domain
  42. Charles Atwood Kofoid
  43. Charles Hederer
  44. Chris Humphries
  45. Clarence Crafoord
  46. Clinical Cardiology
  47. Computers in Biology and Medicine
  48. David Marine
  49. David Wilkie (surgeon)
  50. Donald Floyd Gleason
  51. Edward Anthony Spitzka
  52. Edward Long Fox
  53. Edward Murray East
  54. Edward Shearman Ross
  55. Eliza Maria Mosher
  56. Émile Haug
  57. Eric Anson
  58. Eric Voice
  59. Étienne-Émile Baulieu
  60. Eugene Lindsay Opie
  61. Felix Milgrom
  62. Fessenden Nott Otis
  63. Franz Anton Voegeli
  64. Frederic J. Mouat
  65. Fungal genetics and biology
  66. Gaetano Perusini
  67. Genoscope
  68. George Redmayne Murray
  69. Georges Schaltenbrand
  70. Georg Wüst
  71. Giovanni Maria Lancisi
  72. Gonzalo Rodriguez Lafora
  73. Guy Newton
  74. Hans Buchner (biologist)
  75. Harold Dadford West
  76. Hellin's Law
  77. Hermann Stieve
  78. Hilaire de Chardonnet
  79. Histoire des sciences médicales
  80. Ian Reay Mackay
  81. Ida Henrietta Hyde
  82. Imogene King
  83. Irish Medical Journal
  84. Isabella Karle
  85. Jacob Christoph Le Blon
  86. Jean Weissenbach
  87. John Silas Lundy
  88. John Strachey (geologist)
  89. Joseph Barrell
  90. Joseph de Jussieu
  91. Joseph Igersheimer
  92. Joseph Willot
  93. Journal of Cardiac Surgery
  94. Journal of Medical Biography
  95. Journal of Public Health Policy
  96. Journal of the History of the Neurosciences
  97. Karl Bühler
  98. Leonard Colebrook
  99. Lewis Albert Sayre
  100. Lorenzo Tenchini
  101. Lucien Laubier
  102. M.A. Mendes de Leon
  103. Marian Koshland
  104. Marion Sulzberger
  105. Marius Nygaard Smith-Petersen
  106. Mark Lathrop
  107. Maud Forrester-Brown
  108. Maurice Meslans
  109. Merle Sande
  110. Michael Francis Madelin
  111. Muséum d'histoire naturelle de Nantes
  112. Nat. Rev. Genet.
  113. Natural history museum of Nantes
  114. Nursing times
  115. Olevi Kull
  116. Oswald Bumke
  117. Patrick H. O'Farrell
  118. Paul Kaznelson
  119. Percy Charles Edward d'Erf Wheeler
  120. Philippe de Clermont
  121. Philipp Forchheimer
  122. Pierre Bertholon de Saint-Lazare
  123. Pierre-Émile Martin
  124. Pierre Solomon Ségalas d'Etchépare
  125. Planetarium of Nantes
  126. Proceedings of the Royal College of Physicians of Edinburgh
  127. Ranald Roderick Macdonald
  128. Revue d'histoire de la pharmacie
  129. Richard A. Lockshin
  130. Richard Edwin Shope
  131. Richard E. Shope
  132. Rima Rozen
  133. Robert Metzenberg
  134. Robert Wallace Wilkins
  135. Sante De Sanctis
  136. Shomatsu Yokoyama
  137. Springer Publishing
  138. Stanford Cade
  139. Stanisław Kuczborski
  140. Stanisław Smreczyński (1899–1975)
  141. Tadini
  142. Talk:Alfred Francois Donné
  143. Talk:Alfred François Donné
  144. Talk:Bronisław Hager
  145. Talk:Clarence Crafoord
  146. Talk:Clinical Cardiology
  147. Talk:Mark Lathrop
  148. Tetratricopeptide
  149. The Annals of Thoracic Surgery
  150. Themistocles Gluck
  151. Tissue Antigens
  152. Tommaso Campailla
  153. Transactions of the American Neurological Association
  154. Transactions of the Association of American Physicians
  155. Trans. Assoc. Am. Physicians
  156. User:Plindenbaum/Sandbox
  157. Velvet (algorithm)
  158. Vladimir Pavlovich Efroimson
  159. William Ernest Miles
  160. William Gregory (chemist)
  161. William Jackson Pope
  162. William Thomas Councilman
  163. William Thomas Councilman.
  164. Women & Health


A technical part added later, after a short discussion on FriendFeed. I used the wikipedia API to fetch my contributions. Creating an article is actually fast thanks to my firefox/WP extension and a xslt stylesheet pubmed2wiki. Biographies are found using this pubmed query.

That's it.
Pierre

05 October 2009

Do you know what is a RSS feed ?

Friday , October 2nd 2009.
University of Rouen, BIOtechno Forum
A lecture hall with about 100 PhD students.

Image via wikipedia

"Do you know what is a RSS feed ?"

...No... Nobody knows...