OpenLibrary API RDF wrapper on Google App Engine

I have written a wrapper to expose openlibrary.org api data as RDF. It is written in Python and deployed on Google App Engine. It is only an illustration of Linked Data publication, and in order to get a first feedback, so do not rely on it in your application since the URL or the content will change in the future.

How to use it :

Technical information :

Linked Data Sets :

The following data sets are referenced in the data, with the following heuristics :

  • The wrapper references itself, in properties such as “authors”, or “rdf:type”.
    • heuristic : the author or type open library key is appended to the root URL of the wrapper : “http://olrdf.appspot.com/key/”
  • The lingvoj dataset, for languages
    • heuristic : the openlibrary language key (”/l/eng” for exemple) is parsed, the 3 letter language code is extracted, and an attempt is made to find the corresponding 2-letter language code, with an hardcoded mapping table. The 2-letter code is then appended to the root URI “http://www.lingvoj.org/lang/”. If not found, the 3-letter code is appended to the same root URI.
  • The RDF book mashup, in a “owl:sameAs” property
    • heuristic : append the ISBN10 to the URI prefix “http://www4.wiwiss.fu-berlin.de/bookmashup/books/”
  • (plus it used to call the lcsh.info sparql endpoint to try to match the “subject” property to a corresponding Library of Congress Subject Heading. However this service has recently been shut down…)

Ontology and properties used :

The following properties are used in the generated RDF :

  • Dublin Core (namespace “http://purl.org/dc/elements/1.1/”) : publisher, subject, etc.
  • Dublin Core terms (namespace “http://purl.org/dc/terms/”) : alternative, tableOfContents, format, modified, etc.
  • Bibliographic ontology (namespace “http://purl.org/ontology/bibo/”) : edition, authorList, oclcnum, sibn10, sibn13, etc.
  • Plus of course, rdf, rdfs and owl.
  • For all properties not falling in one of those vocabularies, a property in the wrapper namespace (”http://olrdf.appspot.com/key/“) is generated. No formal description of this ontology is provided.

An exhaustive description of how the Open Library data is mapped to RDF properties can be found on this google spreadsheet.

Feedback on this work is more than welcome. The python code is available on request. Potential improvements are :

  • linking subjects to another controlled vocabulary now that lcsh.info is dead;
  • linking authors to DBPedia;
  • linking countries to geonames;
  • defining a clear ontology of properties;
  • etc…

8 Réponses vers «OpenLibrary API RDF wrapper on Google App Engine»

  1. ldosdat dit :

    Well done Thomas! How did you like using google app engine?

  2. Thomas Francart dit :

    Thanks. Well, the GAE development environement is kind of buggy, the limitation on URL request is frustating when you need to do SPARQL queries all around, and it works only in Python, not Java, but overall it is easy to deploy your app. I haven’t tried the other services, like google base, that are also adding value to the service.

  3. taboularasa dit :

    Hello,
    I would be very interested to look at your modified SPARQL Wrapper. Would you be willing to share your code with me for educational purposes?
    Thanks in advance.

  4. Thomas Francart dit :

    Sure, but the email address I got with your comment (dupe-2…@gmail.com) is invalid. Could you post a comment agin with another valid address ?

  5. taboularasa dit :

    @Thomas
    oops! I didn’t know that my profile was out of date. It’s fixed now. but just in case:
    david at hadto dot net

  6. gwordpressuser dit :

    Hi Thomas,

    great work – thanks for blogging that! Did you also find the AppEngine datastore very enticing regarding storage of the ontology triplets?

    And I’m very interested in sharing your code. Could you pass me a copy? Did you decide on the license?

    Cheers!
    Georg

  7. br5492 dit :

    Hey Thomas – this is so very interesting! I wonder if you would mind sharing your code with me? Thanks in advance. I’m also interested in the app engine datastore – what do you think of it?

    Ken
    kirby at k2group dot com

  8. Thomas Francart dit :

    Hi – I sent you the code by email. I cannot give any advice on the app engine datastore since this wrapper converts data on the fly and does not store anything – so it does not use the datastore.

    Thomas

Laisser un commentaire

Vous devez être connecté pour rédiger un commentaire.