Re: Experimental Ruby SKOS API

On Thu, Feb 19, 2009 at 11:05:48AM +0000, Simon Jupp wrote:
>> Have you looked at all at indexing/search facilities for SKOS? My next 
>> step was to try to wire this up with Lucene indexes, and experiment 
>> with "did you mean?" and autocompletion facilities that could be used 
>> in searching and tagging UI.
>
> Not looked at Lucene, we have look up and autocompletion in Protege, I  
> think they are done with simple hash maps and seem fast enough for the  
> largest SKOS files I could find (>100,000 concepts).

Just a quick word to say we've had some good experience of using
Lucene with Jena TDB via LARQ [1]. The latest release (0.4-alpha3) of
sparqlite [2] allows a TDB backed SPARQL endpoint to be configured
with a LARQ string index, so you can embed lucene queries in SPARQL
queries via the pf:textMatch property.

Cheers,

Al

[1] http://jena.sourceforge.net/ARQ/lucene-arq.html
[2] http://code.google.com/p/sparqlite/downloads/list

>
> Cheers,
> Simon
>>
>>
>> cheers,
>>
>> Dan
>>
>>> Cheers,
>>> Simon
>>>
>>>
>>> 1- http://skosapi.sourceforge.net/
>>> 2- http://owlapi.sourceforge.net/
>>>
>>>
>>> Simon Jupp
>>> simon.jupp@manchester.ac.uk
>>> http://www.cs.man.ac.uk/~sjupp/
>>>
>>>
>>> On 18 Feb 2009, at 11:12, Dan Brickley wrote:
>>>
>>>>
>>>> Just a quick note to report on a work-in-progress I've been  
>>>> exploring
>>>> this week.
>>>>
>>>> I started to make a Ruby API for SKOS.
>>>>
>>>> The distinguishing feature here is that it uses jruby (a Ruby
>>>> implementation in pure Java). As such it can call on the full powers
>>>> of the Jena toolkit, which go far beyond anything available  
>>>> currently
>>>> in Ruby. At the moment it doesn't do much, I just parse SKOS and  
>>>> make
>>>> a tiny object model which exposes little more than prefLabel and
>>>> broader/narrower.
>>>>
>>>> I think it's worth exploring because Ruby is rather nice for
>>>> scripting, but lacks things like OWL reasoners and the general
>>>> maturity of Java RDF/OWL tools (parsers, databases, etc.).
>>>>
>>>> I've posted some example snippet in See
>>>> http://svn.foaf-project.org/foaftown/2009/skosdex/readme.txt which
>>>> uses the UKAT SKOS dataset.
>>>>
>>>> The idea is to use some ruby idioms to explore the SKOS graph.
>>>>
>>>> Quick example. This goes 2 levels down from some chosen concept:
>>>>
>>>> s1 = SKOS.new()
>>>> s1.read("file:samples/archives.rdf")
>>>> c1 = s1.concepts["http://www.ukat.org.uk/thesaurus/concept/1366"]
>>>> puts "test concept is "+ c1 + " " + c1.prefLabel
>>>> c1.narrower do |uri|
>>>> c2 = s1.concepts[uri]
>>>> puts "\tnarrower: "+ c2 + " " + c2.prefLabel
>>>> c2.narrower do |uri|
>>>> c3 = s1.concepts[uri]
>>>> puts "\t\tnarrower: "+ c3 + " " + c3.prefLabel
>>>> end
>>>> end
>>>>
>>>> See http://svn.foaf-project.org/foaftown/2009/skosdex/readme.txt for
>>>> the indented output, which I won't show here as it'll get lost in
>>>> email formatting.
>>>>
>>>> I'm interested to hear if anyone else has explored this topic.
>>>> Obviously there is a lot more to SKOS than broader/narrower, so I'm
>>>> very interested to find collaborators or at least a sanity check
>>>> before taking this beyond a rough demo.
>>>>
>>>> Thanks for any thoughts,
>>>>
>>>> Dan
>>>>
>>>> --
>>>> http://danbri.org/
>>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
>
>
> Simon Jupp
> simon.jupp@manchester.ac.uk
> http://www.cs.man.ac.uk/~sjupp/
>
>
>
>
>

-- 
Alistair Miles
Senior Computing Officer
Image Bioinformatics Research Group
Department of Zoology
The Tinbergen Building
University of Oxford
South Parks Road
Oxford
OX1 3PS
United Kingdom
Web: http://purl.org/net/aliman
Email: alistair.miles@zoo.ox.ac.uk
Tel: +44 (0)1865 281993

Received on Thursday, 19 February 2009 12:30:31 UTC