Definition source

Temp version at http://esw.w3.org/topic/OBIDefinitionSource.

Here is a BNF style grammar for definition source. The intention is that definition_source be simple enough to be entered by the curator as a string, but unambiguous enough that it can be translated into OWL instances corresponding to the thing cited, such as a book, article, web page, etc.

An example of how this could be used is discussed in an email message on the obi-devel mailing list (http://tinyurl.com/ypowld) the email is also included below, at "More Documentation".

safari&rls define%3Adetaile d&btnG=Search>@2007/03/06

ISBN:1402199031

mesh:D017774#Long Term Potentiation

Person:@2007/1/25#Tim Berners Lee

PERSON:Franklin Delaware Roosevelt@1933/03/04#The only thing to fear...

TERM:#sequence

term:C0206249#Long term potentiation

BOOK: @2001

doi:10.1063/1.1144814pp2

===More documentation ===

Here is the email that I sent regarding an earlier version of the proposal. It demonstrates how OWL instances can be generated and maintained given the string definitions, and how one would query them.

From:    alanruttenberg@gmail.com Subject:       metadata example Date:  February 28, 2007 3:21:33 AM EST To:      obi-devel@lists.sourceforge.net

I signed up to give an example of my proposal, an alternative to "complex properties". Attached are 4 files which are described below.

The original is a small ontology modeling what we would have in OBI. The only term it has from OBI is "Digital Document", which is the root of definition source objects.

? There are also classes: tag, and taggedTerm as discussed in my proposal. As pointed out in earlier discussion, it's not clear where they should be placed. Finally, "My Example" is the class that will be annotated with a definition source and with some alternative terms. The namespace for the metadata definitions is ~http://obi.org/metadata#

Following (inline image) are the properties used (there are some extraneous annotation properties also listed) ? The script that does the work is at http://svn.mumble.net:8080/svn/lsw/trunk/obi/tags-example.lisp

To summarize:

The initial ontology is metadata-initial.owl.

The user supposedly fills in the definitionsourcestring for myexample as "~ISBN:0743222091" The script creates an instance of obim:book and fills in the identifiedByISBN property with the ISBN number. The resultant ontology is metadata-after-book.owl

note: I've used strings for the DOI, pubmed, and ISBN, but it would be better to fill these with official URLs for those resources

The user supposedly edits the definition source and changes it to "DOI:10.1002/ijc.20376" The script removes the obim:book and creates an obim:article with an identifiedByDOI property set to the doi. The resultant ontology is metadata-after-article.owl

For the alternativeterm example, the property alternativeterm_string is filled with "[French:mon exemple||Web:][Norwegian:min eksempel||Web:]"

alternative_term property of myexample. which are appropriately filled with the instances above.
 * The script creates tag instances TagFrench and TagNorwegian.
 * It then creates an instance of webPage for the source.
 * Finally it creates two instances of taggedTerm and makes them the value of the
 * Each taggedTerm has three properties, "isTerm", "isTagged", and "fromSource",
 * The name of this ontology is metadata-tagged.owl

I haven't bothered to implement the update process for this field yet but that is demonstrated for the definition source.

The top level function is called "demo" It prints the following:

Initial file is consistent, OWL-LITE before metadata created Query: What's the definitionsourcestring? PREFIX obim:  SELECT ?string WHERE { obim:myexample obim:definitionsourcestring ?string. } Results: ISBN:0743222091

Query: Show the definition_source PREFIX obim:  PREFIX rdf:  SELECT ?meta ?prop ?value WHERE { ?meta rdf:type obim:publication. obim:myexample obim:definition_source ?meta. ?meta ?prop ?value. } Results:

after metadata generated Query: What's the definitionsourcestring? PREFIX obim:  SELECT ?string WHERE { obim:myexample obim:definitionsourcestring ?string. } Results: ISBN:0743222091

Query: Show the definition_source PREFIX obim:  PREFIX rdf:  SELECT ?meta ?prop ?value WHERE { ?meta rdf:type obim:publication. obim:myexample obim:definition_source ?meta. ?meta ?prop ?value. } Results: ====obim:myexampledefinitionsource      !obim:identifiedByISBN  0743222091 ==== ====obim:myexampledefinitionsource      !rdf:type       !owl:Thing ==== ====obim:myexampledefinitionsource      !rdf:type       !obim:book ==== ====obim:myexampledefinitionsource      !rdf:type       !obim:publication ==== ====obim:myexampledefinitionsource      !rdf:type       !obi:OBI1002 ==== ====obim:myexampledefinitionsource      !obim:metadataFor       !obim:myexample ==== ====obim:myexampledefinitionsource      !obim:metadataOnProperty ==== ====obim:definition_source ====

Query: Find old metadata, so we can delete it PREFIX obim:  SELECT ?meta WHERE { obim:myexample obim:definition_source ?meta. } Results: ====obim:myexampledefinitionsource ====

after definitionsourcestring changed Query: What's the definitionsourcestring? PREFIX obim:  SELECT ?string WHERE { obim:myexample obim:definitionsourcestring ?string. } Results: DOI:10.1002/ijc.20376

Query: Show the definition_source PREFIX obim:  PREFIX rdf:  SELECT ?meta ?prop ?value WHERE { ?meta rdf:type obim:publication. obim:myexample obim:definition_source ?meta. ?meta ?prop ?value. } Results: ====obim:myexampledefinitionsource      !obim:identifiedByDOI ==== 10.1002/ijc.20376 ====obim:myexampledefinitionsource      !rdf:type       !owl:Thing ==== ====obim:myexampledefinitionsource      !rdf:type       !obim:publication ==== ====obim:myexampledefinitionsource      !rdf:type       !obi:OBI1002 ==== ====obim:myexampledefinitionsource      !rdf:type       !obim:article ==== ====obim:myexampledefinitionsource      !obim:metadataFor       !obim:myexample ==== ====obim:myexampledefinitionsource      !obim:metadataOnProperty ==== ====obim:definition_source ====

Final file is consistent, OWL-LITE Query: List alternative terms and tags PREFIX obim: <http://obi.org/metadata#> SELECT ?thing ?term ?tag WHERE { ?thing obim:alternative_term ?tt. ?tt obim:isTagged ?tag. ?tt obim:isTerm ?term. } Results: ====obim:myexample mon exemple    !obim:Tag_French ==== ====obim:myexample min eksempel   !obim:Tag_Norwegian ====

The whole thing could be managed with sparql alone save one thing: The removal of instances. So I've used the jena api for modifying the ontology, though there are other options, of course (though I ran into problems trying to do the stale instance removal with the native pellet API and the old OWLAPI, though presumably this works properly with the released RSN version of OWLAPI)

Demo runs in LSW, which is available at http://svn.mumble.net:8080/svn/lsw/trunk