Hi all,

I realized one strange problem. I have datatype predicate which has range xsd:decimal. When I "copy" literal using rules, the copy is notype literal(the infered copy is no xsd:decimal anymore). Is it correct behavior?(Owlim 5.5 b7071) The testcase could be

Data
<http://www.foo.com/1> foo:decimalPredicate "10"^^xsd:decimal . 
<http://www.foo.com/1> foo:someRelation <http://www.foo.com/2>

Id: someRule
x <foo:decimalPredicate> decimal 
x <foo:someRelation> y
------------
y <foo:decimalPredicate> decimal

Result
<http://www.foo.com/2> foo:decimalPredicate "10"

Thank you for your time,

Marek

asked 28 Mar '14, 08:44

Marek%20%C5%A0urek's gravatar image

Marek Šurek
161212127
accept rate: 0%


There is nothing changed in 5.5 at the way we handle nodes during inference.

What is bound to the 'decimal' variable is used without any kind of transformation within the consequent, so it is very strange that you are getting such a result.

How did you get the output? For instance the workbench does not display the datatype - only the literal's label but one may see the actual value as part of the explore link on the status bar of the browser.

In any case, I did a quick check with your exact rule and data and the inference is correct (just modified RDFS.pie file by adding it):

Prefices
{
...
     foo      :  http://www.foo.com/
}
...
Rules
{
...
Id: someRule
    x <foo:decimalPredicate> decimal 
    x <foo:someRelation> y
    ------------
    y <foo:decimalPredicate> decimal
}
then added the data:
insert data {
 <http://www.foo.com/1/> <http://www.foo.com/decimalPredicate/> "10"^^xsd:decimal . 
 <http://www.foo.com/1/> <http://www.foo.com/someRelation> <http://www.foo.com/2> .
}
and using
DESCRIBE <http://www.foo.com/2> 
got this as output, which is IMO is correct ...
[query #1 : describe <http://www.foo.com/2>]
[subject=http://www.foo.com/2;predicate=http://www.w3.org/1999/02/22-rdf-syntax-ns#type;object=http://www.w3.org/2000/01/rdf-schema#Resource]
[subject=http://www.foo.com/2;predicate=http://www.foo.com/decimalPredicate;object="10"^^<http://www.w3.org/2001/XMLSchema#decimal>]
[subject=http://www.foo.com/1;predicate=http://www.foo.com/someRelation;object=http://www.foo.com/2]

link

answered 28 Mar '14, 09:53

Damyan%20Ognyanov's gravatar image

Damyan Ognyanov ♦♦
34317
accept rate: 25%

edited 28 Mar '14, 09:57

Hi Damyan,

thank you for your answer. Now I see the problem in our data. Even though ontology specifies correct datatypes, it happens that some values in our application are inserted without any datatype and therefore reasoner produce such result. Sorry for bothering you with our bug.

Thank you,

Marek

link

answered 30 Mar '14, 17:04

Marek%20%C5%A0urek's gravatar image

Marek Šurek
161212127
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3

Asked: 28 Mar '14, 08:44

Seen: 1,449 times

Last updated: 18 Jul, 07:32

powered by BitNami OSQA