W3C home > Mailing lists > Public > semantic-web@w3.org > December 2007

[announce] URF adds named graphs

From: Garret Wilson <garret@globalmentor.com>
Date: Sat, 01 Dec 2007 22:13:54 -0800
Message-ID: <47524D22.9050004@globalmentor.com>
To: Semantic Web <semantic-web@w3.org>

The latest URF version, 2007-11-22, adds several features. Namespace 
prefix declarations in TURF are now purely syntactical. But most 
significant is the addition of named graphs and the reformulation of 
scoped properties in terms of named graphs. The latest URF specification 
is at:

http://www.urf.name/

Here's a quick overview of URF named graphs. First, let's assert that 
Punxsutawney Phil (the famous groundhog of the American holiday 
Groundhog Day) predicts the weather (as he is supposed to do on 2 
February by whether he sees his shadow in Punxsutawney, Philadelphia):

punx.Phil:
punx:predicts=punx.weather
;

Just like in RDF, we can say that there exists such a proposition ("Phil 
predicts the weather.") without actually asserting that proposition by 
reifying the assertion above:

(urf.Proposition):
urf.subject=punx.Phil,
urf.predicate=punx.predicts,
urf.object=punx.weather
;

TURF now has a nice short form for indicating a proposition using open 
and closed double quotation marks:

“punx.Phil, punx.predicts, punx.weather”

Just to be complete, let's represent that in a TURF document with its 
namespace prefixes declared:

`URF
*
"punx"=<http://example.com/punxsutawney>
*
¤
“punx.Phil, punx.predicts, punx.weather”
.

TURF documents now have a signature (`URF), a special header (surrounded 
by '*') and a body definition ('¤' and '.'); you'll see why in a second.

Now to named graphs, or "knowledge communities" as URF calls them: a 
knowledge community (urf.Community) is a subclass of urf.Set. A 
proposition is said to be asserted by the community if the community 
contains the proposition as one of its elements. So if we were to say 
that there is a knowledge community, Punxsutawney, that believes that 
Punxsutawney Phil predicts the weather, we would represent that in TURF 
as the following:

`URF
*
"urf"=<http://urf.name/urf>,
"punx"=<http://example.com/punxsutawney>
*
¤
punx.Punxsutawney(urf.Community)
{
“punx.Phil, punx.predicts, punx.weather”
}
.

Here the instance of the class urf.Community is what is commonly known 
as a named graph, identified by the URI 
<http://example.com/punxsutawney#Punxsutawney>. The proposition 
"Punxsutawney Phil predicts the weather" is considered to be asserted by 
that community because it appears as an element of the urf.Community 
(which is a subclass of urf.Set).

But URF communities also have short forms in TURF, allowing you to 
indicate the propositions asserted by the community using their 
unreified property=value forms. The URF community short form begins with 
the currency sign '¤' and ends with a full stop '.', which gives us the 
following TURF document semantically identical to the one above:


`URF
*
"urf"=<http://urf.name/urf>,
"punx"=<http://example.com/punxsutawney>
*
¤
punx.Punxsutawney(urf.Community)
¤
punx.Phil:
punx:predicts=punx.weather
.
.

Now you can see why TURF documents have a body consisting of '¤' and 
'.', because in order to make any assertions (even to assert the 
existence of propositions or of other knowledge communities) the 
assertions have to exist in some knowledge community themselves. In URF, 
this "root community" in which all assertions are made in a document is 
called the "instance community" (equivalent to the graph formed by a RDF 
instance).

So what about the special URF "scoped properties" that only are valid 
(or considered asserted) in the context of some other 
subject-predicate-object triple? Each URF proposition (urf.Proposition) 
is a subclass of urf.Community (i.e. each statement is itself a named 
graph), which means that it can contain asserted propositions. An URF 
scoped property, therefore, is an assertion that is part of the 
knowledge community formed by its context assertion.

We can take two scoped properties in the example below (scoped 
properties are now indicated by a grave accent '`' before the equals 
sign '='):

`URF
*
"example"=<http://example.com/example>
*
¤
example.juan:
example.name="John":
example.lang`=example.english
;,
example.weight=#72:
example.unit`=example.kilogram
;
;
.

The propositions "The string "John" is English" and "#72 is in kilogram 
units" are simply propositions that are asserted in the propositions 
(which are knowledge communities) "Juan's name is "John"" and "Juan's 
weight is #72", respectively. If you want to spell it out, the following 
is equivalent (using labeled properties to reify each assertion):

`URF
*
"example"=<http://example.com/example>
*
¤
example.juan:
example.name|juanNameJohn|="John",
|juanNameJohn|
¤
"John":
example.lang=example.english
;
.,
example.weight|juanWeight72|=#72,
|juanWeight72|
¤
#72:
example.unit=example.kilogram
;
.
;
.

Or if you like to reify and unreify everything manually, you can say the 
following, which is also semantically equivalent:

`URF
*
"urf"=<http://urf.name/urf>,
"example"=<http://example.com/example>
*
¤
example.juan:
example.name="John",
example.weight=#72,
“example.juan, example.name, "John"”
{
“"John", example.lang, example.english”
},
“example.juan, example.weight, #72”
{
“#72, example.unit, example.kilogram”
}
;
.

The online URF processor at 
http://www.guiseframework.com/demo/urfprocess can't yet handle all the 
fancy nested URF knowledge communities yet, but it handles almost 
everything else.

Cheers,

Garret
Received on Sunday, 2 December 2007 06:15:18 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:19 GMT