[ANN] RDF 1.1 Turtle implementation in Ruby

I've just released rdf-turtle [1] [2], an implementation of the current RDF 1.1 Turtle specification [3] in Ruby for the RDF.rb library suite. Note that the rdf-n3 gem also asserts that it will parse Turtle, but there are some important differences from Notation3 and earlier Turtle specs:

* additional string-literal support 'lit', "lit", '''lit''', and """lit""",
* @prefix support uses SPARQL-like PNAMES instead of the more restrictive QNAMES,
* The empty prefix ":" is no longer a synonym for <#>. Out of spec, it is implemented as <>,
* Uses IRIs instead of URI References.
* For the time being, plain literals are generated without an xsd:string datatype, but literals with an xsd:string datatype are saved as non-datatyped triples in the graph. This will be updated in the future when the rest of the library suite is brought up to date.

The gem supports both parsing from Turtle to a graph and serializing from a graph to Turtle.

Basic usage is fairly simple:

    require 'rdf/turtle'
    graph = RDF::Graph.load("https://raw.github.com/gkellogg/rdf-turtle/master/etc/doap.ttl", :format => :ttl)
    graph.dump(:ttl)

Issues with the spec will be posted to public-rdf-comments@w3.org. Issues with the gem should go to public-rdf-ruby@w3.org
Gregg

[1] http://github.org/gkellogg/rdf-turtle
[2] http://rubygems.org/gems/rdf-turtle
[3] http://www.w3.org/TR/2011/WD-turtle-20110809/

Received on Monday, 29 August 2011 18:39:17 UTC