You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@marmotta.apache.org by "Robson, Alan" <al...@viasat.com> on 2016/01/20 11:13:44 UTC

sKWRL / Kiwi rule to match literal

>From what I read online about the "BODY" elements of kiwi rules...
§  (S P O) denotes a triple pattern; S and P can be either URIs or variables, and O can be either a URI, a variable, or a literal. A triple pattern occurring in the body of a rule is considered a query pattern, a triple pattern occurring in the head of a rule is considered a construction pattern used for creating new triples
So I can write a rule like ($1 $2 "Alan") and I notice that it does match triples with a literal object value of  "Alan"@en.

But it won't match a literal of just "Alan" without the English language tag, it seems to have added the tag to the rule silently based on my locale.

How can I get Kiwi to match strings that have no language tag, or what about getting it to match integers or other XML typed literals. Is there some syntax in Kiwi that I'm missing that would permit  things like that to be expressed ?

By any chance can I put an expression into the kiwi rule language that lets me match, say, a range of integer literal objects  (eg ($1 $2 <5) or something similar ?

Is there a more expressive rule language that I can run against the marmotta triplestore ?

Many thanks

Alan

Re: sKWRL / Kiwi rule to match literal

Posted by Sergio Fernández <wi...@apache.org>.
Hi Alan,

On Wed, Jan 20, 2016 at 11:13 AM, Robson, Alan <al...@viasat.com>
wrote:
>
> So I can write a rule like ($1 $2 “Alan”) and I notice that it does match
> triples with a literal object value of  “Alan”@en.
>
>
>
> But it won’t match a literal of just “Alan” without the English language
> tag, it seems to have added the tag to the rule silently based on my locale.
>

That may be a bug. Maybe Sebastian could give you a reasonable explanation.
In the meantime, please report the details to our jira and we'll see what
we can do for you.

Is there a more expressive rule language that I can run against the
> marmotta triplestore ?
>

Currently not, sorry.

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 6602747925
e: sergio.fernandez@redlink.co
w: http://redlink.co