Missing Inferred Triples

0 views
Skip to first unread message

Matías Parodi

unread,
Nov 9, 2013, 7:44:49 AM11/9/13
to sta...@clarkparsia.com
Hello,

I've extended the ontology of my last message (http://www.apaste.info/3mIt) to show you something I couldn't figure out (the triples that must be inferred are comment after every declared triple).

First, given that semantic and data of this example, there are some triples that are missing in the result as you can see here.

% ./bin/stardog query "mydb;reasoning=SL" "SELECT DISTINCT ?s ?p ?o WHERE {?s ?p ?o. ?s a owl:NamedIndividual. ?p a owl:ObjectProperty. }"
+----------------------------------+---------------------------------+----------------------------------+
|                s                 |                p                |                o                 |
+----------------------------------+---------------------------------+----------------------------------+
| http://mydb.com/data#MyVideo     | http://mydb.com/ont#hasFragment | http://mydb.com/data#MyFragment  |
| http://mydb.com/data#MyFragment  | http://mydb.com/ont#hasMetadata | http://mydb.com/data#MyMetadata1 |
| http://mydb.com/data#MyMetadata1 | http://mydb.com/ont#hasMetadata | http://mydb.com/data#MyMetadata2 |
+----------------------------------+---------------------------------+----------------------------------+

Additionaly, even the types for the inferred objects are not being shown.
 
% ./bin/stardog query "mydb;reasoning=SL" "SELECT DISTINCT ?s ?t WHERE {?s a ?t. ?s a owl:NamedIndividual. ?t a owl:Class. }"                    
+---------------------------------+------------------------------+
|                s                |              t               |
+---------------------------------+------------------------------+
| http://mydb.com/data#MyFragment | http://mydb.com/ont#Fragment |
| http://mydb.com/data#MyFragment | owl:Thing                    |
| http://mydb.com/data#MyVideo    | http://mydb.com/ont#Video    |
| http://mydb.com/data#MyVideo    | owl:Thing                    |
+---------------------------------+------------------------------+

But it's weird, because each of these missing triples are actually being inferred as I show in the following three queries.

% ./bin/stardog query "mydb;reasoning=SL" "SELECT DISTINCT ?s ?p ?o WHERE {?s <http://mydb.com/ont#hasMetadata> ?o. ?s a owl:NamedIndividual. }"
+----------------------------------+----------------------------------+
|                s                 |                o                 |
+----------------------------------+----------------------------------+
| http://mydb.com/data#MyVideo     | http://mydb.com/data#MyMetadata1 |
| http://mydb.com/data#MyFragment  | http://mydb.com/data#MyMetadata1 |
| http://mydb.com/data#MyVideo     | http://mydb.com/data#MyMetadata2 |
| http://mydb.com/data#MyFragment  | http://mydb.com/data#MyMetadata2 |
| http://mydb.com/data#MyMetadata1 | http://mydb.com/data#MyMetadata2 |
+----------------------------------+----------------------------------+

% ./bin/stardog query "mydb;reasoning=SL" "SELECT DISTINCT ?s ?p ?o WHERE {?s <http://mydb.com/ont#isMetadataOf> ?o. ?s a owl:NamedIndividual. }"
+----------------------------------+----------------------------------+
|                s                 |                o                 |
+----------------------------------+----------------------------------+
| http://mydb.com/data#MyMetadata1 | http://mydb.com/data#MyVideo     |
| http://mydb.com/data#MyMetadata1 | http://mydb.com/data#MyFragment  |
| http://mydb.com/data#MyMetadata2 | http://mydb.com/data#MyVideo     |
| http://mydb.com/data#MyMetadata2 | http://mydb.com/data#MyFragment  |
| http://mydb.com/data#MyMetadata2 | http://mydb.com/data#MyMetadata1 |
+----------------------------------+----------------------------------+

 % ./bin/stardog query "mydb;reasoning=SL" "SELECT DISTINCT ?s WHERE {?s a <http://mydb.com/ont#Metadata>. ?s a owl:NamedIndividual. }"
+----------------------------------+
|                s                 |
+----------------------------------+
| http://mydb.com/data#MyMetadata1 |
| http://mydb.com/data#MyMetadata2 |
+----------------------------------+

What's the problem with the first two queries? Why Stardog is not returning the inferred information?

Thank you,
Matt

Héctor Pérez-Urbina

unread,
Nov 12, 2013, 2:16:52 PM11/12/13
to stardog
Hi,


On Sat, Nov 9, 2013 at 7:44 AM, Matías Parodi <mparo...@gmail.com> wrote:
Hello,

I've extended the ontology of my last message (http://www.apaste.info/3mIt) to show you something I couldn't figure out (the triples that must be inferred are comment after every declared triple).

First, given that semantic and data of this example, there are some triples that are missing in the result as you can see here.

% ./bin/stardog query "mydb;reasoning=SL" "SELECT DISTINCT ?s ?p ?o WHERE {?s ?p ?o. ?s a owl:NamedIndividual. ?p a owl:ObjectProperty. }"
+----------------------------------+---------------------------------+----------------------------------+
|                s                 |                p                |                o                 |
+----------------------------------+---------------------------------+----------------------------------+
| http://mydb.com/data#MyVideo     | http://mydb.com/ont#hasFragment | http://mydb.com/data#MyFragment  |
| http://mydb.com/data#MyFragment  | http://mydb.com/ont#hasMetadata | http://mydb.com/data#MyMetadata1 |
| http://mydb.com/data#MyMetadata1 | http://mydb.com/ont#hasMetadata | http://mydb.com/data#MyMetadata2 |
+----------------------------------+---------------------------------+----------------------------------+

Note that there are quite a few triples commented out in your ttl file.
 

Additionaly, even the types for the inferred objects are not being shown.
 
% ./bin/stardog query "mydb;reasoning=SL" "SELECT DISTINCT ?s ?t WHERE {?s a ?t. ?s a owl:NamedIndividual. ?t a owl:Class. }"                    
+---------------------------------+------------------------------+
|                s                |              t               |
+---------------------------------+------------------------------+
| http://mydb.com/data#MyFragment | http://mydb.com/ont#Fragment |
| http://mydb.com/data#MyFragment | owl:Thing                    |
| http://mydb.com/data#MyVideo    | http://mydb.com/ont#Video    |
| http://mydb.com/data#MyVideo    | owl:Thing                    |
+---------------------------------+------------------------------+

This is indeed a bug introduced when we added support for nonrecursive datalog evaluation. I'll work on this and include the fix in a future release.
 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en



--
Best,
Héctor

Matías Parodi

unread,
Nov 18, 2013, 10:17:26 AM11/18/13
to sta...@clarkparsia.com
Just in case, the triples that are commented are the ones that Stardog must infer, I pasted them for clarity.
Reply all
Reply to author
Forward
0 new messages