Category Archives: ruby

Skosdex: SKOS utilities via jruby

I just announced this on the public-esw-thes and public-rdf-ruby lists. I started to make a Ruby API for SKOS. Example code snippet from the readme.txt (see that link for the corresponding output): require “src/jena_skos” s1 = SKOS.new(“http://norman.walsh.name/knows/taxonomy”) s1.read(“http://www.wasab.dk/morten/blog/archives/author/mortenf/skos.rdf” ) s1.read(“file:samples/archives.rdf”) s1.concepts.each_pair do |url,c| puts “SKOS: #{url} label: #{c.prefLabel}” end c1 = s1.concepts["http://www.ukat.org.uk/thesaurus/concept/1366"] # Agronomy puts [...]

RDF in Ruby revisited

If you’re interested in collaborating on Ruby tools for RDF, please join the public-rdf-ruby@w3.org mailing list at W3C. Just send a note to public-rdf-ruby-request@w3.org with a subject line of “subscribe”. Last weekend I had the fortune to run into Rich Kilmer at O’Reilly’s ‘Social graph Foo Camp‘ gathering. In addition to helping decorate my tent, [...]

Ruby client for querying SPARQL REST services

I’ve started a Ruby conversion of Ivan Herman’s Python SPARQL client, itself inspired by Lee Feigenbaum’s Javascript library. These are tools which simply transmit a SPARQL query across the ‘net to a SPARQL-protocol database endpoint, and handle the unpacking of the results. These queries can result in yes/no responses, variable-to-value bindings (rather like in SQL), [...]

Ruby dup() and clone() with frozen strings

I’m exhuming some 5-year old Ruby RDF code, and in the process finding a few things got broken while I was in the time capsule. Here in the shiny future, I found myself hitting an unfamiliar “can’t modify frozen string” error. It all worked just fine back in the hazy summer of 2002, I’m sure. [...]