Copyright © 2009 Toby Inkster, some rights reserved.
Microblogging is an increasingly popular form of online communication. It is characterised by very low barriers to publishing and hard limits on the character-length of each publication.
Although "hashtags" allow microbloggers to classify their messages, there is little other opportunity for embedding rich semantics in microblog posts.
This document introduces MicroTurtle, a serialisation for RDF suitable for embedding into microblog posts.
This document is published by buzzword.org.uk, a web site that hosts various specifications, articles and tools of use to web publishers. This is not a W3C recommendation. It is not even a buzzword.org.uk recommendation yet.
The author welcomes feedback on this draft by e-mail to mail@tobyinkster.co.uk.
This document is available under a licence which allows the creation of derivative works under certain conditions. For the purpose of licensing, implementations of the ideas considered in this specification shall not be considered derivative works.
MicroTurtle is not intended to be transmitted as a standalone document, but rather embedded in other formats, such as RSS or Atom. It has no Internet content type ("MIME type").
A MicroTurtle message consists of a header, followed by one or more white space chatacters, the string #ttl, one or more whitespace characters, and lastly the body. Other than context, the existence of the string #ttl surrounded by whitespace characters is the only way of "sniffing" MicroTurtle.
@@TODO:
The #ttl hashtag will probably be changed in the next spec revision. This is because of a conflict with Twitter Taste Live.
The header is a free-form text string, usually intended as a description of the rest of the message. It may be omitted, in which case, the whitespace following it can also be omitted.
The body is a variation of Turtle, described in greater detail below.
MicroTurtle messages which are 140 characters or less (which, because of Unicode, may be more than 140 bytes) are referred to as MicroTurtle.strict.
MicroTurtle is identical to Turtle with the following exceptions:
There are no @-keywords. The message's base URL is set by context. CURIE prefixes are hard-coded by this specification, with a fallback to lookups on prefix.cc (you may, of course provide full URIs for terms).
There are additional keywords other than Turtle's usual a keyword.
Notation3's is ... of syntax is supported.
Surrounding HTTP(S) URLs with <angled brackets> is optional provided the URLs contain no whitespace. (http and httpd are still usable as CURIE prefixes, provided that they are not followed by //.)
Hashtags are allowed anywhere. This is probably the most radical departure from Turtle's syntax, so probably requires a demonstration.
#d1 <#me> #m1 a #m2 foaf:Person #m3 . #d2 _:bob #b1 foaf:knows #b2 [ #f1 foaf:name #f2 "Freddy" #f3 ] #b3 . #d3
Is equivalent to the following in regular Turtle:
@prefix foaf : <http://xmlns.com/foaf/0.1/> . @prefix rdfg : <http://www.w3.org/2004/03/trix/rdfg-1/> . @prefix tags : <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> . <> a rdfg:Graph ; tags:taggedWithTag [ tags:name "d1" ] , [ tags:name "d2" ] , [ tags:name "d3" ] . <#me> a foaf:Person ; tags:taggedWithTag [ tags:name "m1" ] , [ tags:name "m2" ] , [ tags:name "m3" ] . _:bob tags:taggedWithTag [ tags:name "b1" ] , [ tags:name "b2" ] , [ tags:name "b3" ] ; foaf:knows [ foaf:name "Freddy" ; tags:taggedWithTag [ tags:name "f1" ] , [ tags:name "f2" ] , [ tags:name "f3" ] ] .
That is, hashtags are taken to apply to the current subject, or if there is no current subject, to the graph itself. They may appear between any terms in Turtle triples and do not interrupt the flow. Hashtags inside string literals or inside URIs should not be interpreted by MicroTurtle parsers, but may be by general microblogging implementations. Hashtags match the regular expression /#(\S+)/
.
The vocabulary used to encode tags is left up to the implementation, but Richard Newman's tag ontology and SKOS are each recommended.
<#me> refers to the author of the MicroTurtle message. Always.
This may be interpreted as a hashtag by general microblogging implementations (but not by MicroTurtle processors).
<@foo> refers to the person who holds account "foo" on a server determined by context.
cc
.dc
.A standard RDF/XML file using the RSS 1.0 vocabulary. Each feed <item> is potentially a MicroTurtle.strict graph. The <link> specifies the base URL for the graph. The <title> is parsed for MicroTurtle.
An example:
<item rdf:about="http://example.com/notice/12345"> <title>alice: Wow! Great band! #ttl #music <#me> ❤ [ foaf:homepage <http://www.theholdsteady.com/> #altrock ] .</title> <link>http://example.com/notice/12345</link> <!-- ... --> </item>
Which might generate the following RDF:
@prefix foaf : <http://xmlns.com/foaf/0.1/> . @prefix like : <http://ontologi.es/like#> . @prefix rdfg : <http://www.w3.org/2004/03/trix/rdfg-1/> . @prefix tags : <http://www.holygoat.co.uk/owl/redwood/0.1/tags/> . <> a rdfg:Graph ; tags:taggedWithTag [ tags:name "music" ; foaf:homepage <http://example.com/tag/music> ] . <http://example.com/alice#me> like:likes [ foaf:homepage <http://www.theholdsteady.com/> ; tags:taggedWithTag [ tags:name "altrock" ; foaf:homepage <http://example.com/tag/altrock> ] ] .
(As the RDF representation of hashtags is implementation-specific, other interpretations are possible.)