Universal RDF Encoder
Motivation
One of the challenges facing the Semantic Web is availability of data. The Internet is full of information, but until it is available in a semantic, machine-readable format, it is unavailable to the Semantic Web. What this means is that any data needs to be represented and described in RDF and OWL. Techniques are emerging for embedding RDF information in web pages and for extracting structured content from free text. What was desperately needed by the community was a universal tool that can expose anything on the Semantic Web.
Solution
I present to you the Universal RDF Encoder. This encoder allows you to expose any type of data on the Semantic Web in valid RDF/OWL. Want to expose that spreadsheet? Encode it with the Universal RDF Encoder. Have some vacation pictures you would like semantically available to intelligent agents? Expose them with the Universal RDF Encoder. Have an OWL file that just doesn’t feel semantic enough? Increase the semantics by encoding it with the Universal RDF Encoder.
How it Works
The Universal RDF Encoder works by decomposing data into its simplest parts and then representing those pieces, along with their relationships in RDF. The semantics are provided by the Binary Ontology. Here is a snippet of this ingenious ontology:
<-------snip---------->
:Bit a owl:Class ;
rdfs:label "Bit"^^xsd:string ;
owl:oneOf (:Zero :One) .
:Zero
a :Bit ;
rdfs:label "Zero"^^xsd:string .
:One
a :Bit ;
rdfs:label "One"^^xsd:string ;
owl:differentFrom :Zero .
:Byte
a owl:Class ;
rdfs:label "Byte"^^xsd:string .
:ByteStream
a owl:Class ;
rdfs:label "Byte Stream"^^xsd:string .
<-------snip---------->
Here is a simple example of the Semantic-Web-ready data that the Universal RDF Encoder produces:
:exampleByteStream
a bin:ByteStream ;
rdfs:label "Two Four Six Eight"^^xsd:string ;
bin:firstByte [
a bin:Byte ;
bin:bit0 bin:Zero ;
bin:bit1 bin:One ;
bin:bit2 bin:Zero ;
bin:bit3 bin:Zero ;
bin:bit4 bin:Zero ;
bin:bit5 bin:Zero ;
bin:bit6 bin:Zero ;
bin:bit7 bin:Zero
] ;
bin:nextBytes [
a bin:ByteStream ;
bin:firstByte [
a bin:Byte ;
bin:bit0 bin:Zero ;
bin:bit1 bin:Zero ;
bin:bit2 bin:One ;
bin:bit3 bin:Zero ;
bin:bit4 bin:Zero ;
bin:bit5 bin:Zero ;
bin:bit6 bin:Zero ;
bin:bit7 bin:Zero
] ;
bin:nextBytes bin:nil
] .
Where Do I Get It
Here’s the great news. The Universal RDF Encoder is completely open source. There are both binary and source releases available on the project’s File Download page.
The tool allows you to encode any file into RDF using the Binary Ontology. Or you can also use the tool to decode Binary Ontology RDF data files back into their original (non-semantic) form.
How to Use It
You’ll need Java 1.6 to run the binary distribution. You can re-compile the source with 1.5 if you prefer.
Encoding
rdfserializer.bat -s -i <non-semantic file or URL>
Decoding
rdfserializer.bat -d -i <valid binary-ont semanticized file or URL>
An Example Data File is available if you want to try decoding.
Don’t have the patience to use the decoder? Here is the example decoded.