ML Wiki
Machine Learning Wiki - A collection of ML concepts, algorithms, and resources.

Turtle

Turtle

Syntax

uses qnames - binds them to global URIs

@prefix mfg: <http://www.example.com/manufacturing#>
@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#

triples are expressed in the following way, with dot separating triples

  • mfg:Product1 rdf:type mfg:Product .

a is a shortcut for rdf:type

  • so it can read in more natural English
  • Product1 is a Product
  • mfg:Product1 a mfg:Product .

When we describe the same subject, can use “;”:

  • mfg:Product1 rdf:type mfg:Product; mfg:productId "..." .

When we have same subject and same predicate, just use spaces

  • lit:Shakespeare b:hasChild b:Susanne b:Judith b:Hamlet .

Blank nodes:

  • [a bio:Woman; bio:livedIn geo:England]
  • can be used as a subject:
  • lit:Sonnet78 lit:hasInspiration [a bio:Woman; bio:livedIn geo:England]

Sources