title
Header graphic, containing AKSW logo and title of the currently show slide

Turtle
DSL Hacking

Sebastian Tramp / AKSW @ ITEMIS Leipzig
12.10.2012

Outline

AKSW Research Group

Turtle Introduction

AKSW Orga

AKSW History

Emergent Semantics

Research Areas

Emergent Semantics

Projects (selection)

SIMBA - Semantic Abstraction

Research Areas

SIMBA - Semantic Abstraction

Projects (selection)

MOLE - Machine Learning and Ontology Engineering

Research Areas

MOLE - Machine Learning and Ontology Engineering

Projects (selection)

Turtle - Terse RDF Triple Language

The Resource Description Framework (RDF) is a general-purpose language for representing information in the Web.

Turtle is a language to write RDF graphs in a compact form.

RDF Concepts I

Turtle is an RDF Syntax. The most important RDF concepts are

RDF Concepts II

RDF Import / Parser

RDF can be serialized in different syntax. Widely in use are:

But there are many more: N3, (2005, spec TBL), TriX (2004, by HP), GRDDL (2007), RDF/JSON (2008 by Talis), RDFa (2008)

RDF Serializations

venn diagram if rdf syntaxes
http://www.w3.org/DesignIssues/diagrams/n3/venn

Syntax: Turtle / N3

Three simple triples …

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<http://sebastian.tramp.name> a foaf:Person;
    foaf:workInfoHomepage <http://aksw.org/SebastianTramp>;
    rdfs:label "Sebastian Tramp".
    

Syntax: RDF / XML

… can look …

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
   xmlns:foaf="http://xmlns.com/foaf/0.1/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <foaf:Person rdf:about="http://sebastian.tramp.name">
    <rdfs:label>Sebastian Tramp</rdfs:label>
    <foaf:workInfoHomepage rdf:resource="http://aksw.org/SebastianTramp"/>
  </foaf:Person>
</rdf:RDF>
    

Syntax: RDF / JSON

… soooo different.

{
  "http://sebastian.tramp.name" : {
    "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" : [ {
        "value" : "http://xmlns.com/foaf/0.1/Person",
        "type" : "uri"
        }

      ],
    "http://www.w3.org/2000/01/rdf-schema#label" : [ {
        "value" : "Sebastian Tramp",
        "type" : "literal"
        }

      ],
    "http://xmlns.com/foaf/0.1/workInfoHomepage" : [ {
        "value" : "http://aksw.org/SebastianTramp",
        "type" : "uri"
        }

      ]
    }
  }
    

Syntax: Turtle

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<http://sebastian.tramp.name> a foaf:Person;
    foaf:workInfoHomepage <http://aksw.org/SebastianTramp>;
    foaf:knows [
        a foaf:Person;
        rdfs:label "Roland Mücke"
    ].
    rdfs:label "Sebastian Tramp", "Seebi".
    

Turtle allows for prefix declarations, multiple abbrevations as well as nested descriptions. Turtle uses UTF-8 for content encoding and is specified by an EBNF.

Turtle in VIM

screenshot
vim syntax hightlightning with some autocompletion as semweb.vim

Thank you for your Attention!

My WebID:

This slide deck: