Re: Predicate trees?

Hi Hrvoje,

try to look at RDF path languages, this paper may be a good start:

The Perfect Match: RPL and RDF Rule Languages
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.149.865

Also Gremlin, a general graph-based programming language, may be
interesting for you:

http://github.com/tinkerpop/gremlin/wiki

Cheers,
Jakub


On 25.10.2010 19:17, Hrvoje Simic wrote:
> In Scardf (my RDF library for Scala) [1] there is a construct I call a
> "predicate tree" [2]. The idea is to list URI references in a tree
> structure. Given a graph and a single node included in it, a subgraph
> which this tree "spans" can be constructed automatically, using either
> a graph traversal API or by executing a SPARQL CONSTRUCT statement.
>
> For example, a predicate tree written in Scardf like this (this is an
> actual Scala expression):
>
>   name~( given, family? )
>
> would have an effect equivalent to this CONSTRUCT statement, where the
> ?X variable is fixed to a "root" node.
>
> CONSTRUCT {
>   ?X :name ?v2 .
>   ?v2 :given ?v3 .
>   ?v2 :family ?v4 .
> }
> WHERE {
>   ?X :name ?v2 .
>   ?v2 :given ?v3 .
>   OPTIONAL {
>     ?v2 :family ?v4 .
>   }
> }
>
> This is an abstract, concise and composable way to describe the scope
> of triples for a specific root node. Although its nowhere as powerful
> as a full SPARQL expression, I find it to be very practical.
>
> Does anybody know of an equivalent or similar construct described or
> implemented elsewhere in the SemWeb community? I remember seeing a
> similar idea in another library, only there all "branches" were
> optional, but now I can't find it anymore. I'm especially interested
> in any prior theoretical work covering this, or at least related to
> it.
>
> Cheers,
> Hrvoje Simic
>
> [1] http://code.google.com/p/scardf/wiki/ApiOverview
> [2] http://code.google.com/p/scardf/wiki/PredicateTrees
>
>
>

Received on Tuesday, 26 October 2010 06:21:26 UTC