Jürgen Jakobitsch wrote:
thanks, ivan,
i realized that well, thats why i tried
<http://www.turnguard.com/ElectroPop> skos:related ?o OPTION (T_DISTINCT).
in my second test, but that leads to
37000 Error SP031 ...
which is analog to kingsley's query to my point of view,
but there's something i'm missing.
@kingsley :
- my test instances are @ http://turnguard.com/virtuoso/test10.rdf
- i'm loading data like this :
DB.DBA.RDF_LOAD_RDFXML (http_get
('http://www.w3.org/2009/08/skos-reference/skos-owl1-dl.rdf'), 'no',
'urn:reasonertest');
DB.DBA.RDF_LOAD_RDFXML (http_get ('http://www.w3.org/2002/07/owl.rdf'), 'no',
'urn:reasonertest');
DB.DBA.RDF_LOAD_RDFXML (http_get ('http://turnguard.com/virtuoso/test10.rdf'),
'no', 'urn:reasonertest');
rdfs_rule_set ('reasoner', 'urn:reasonertest');
i'll have a test with the relationship data on my server and report back this
evening.
thank you very much for your help!
wkr turnguard
----- Original Message -----
From: "Ivan Mikhailov" <imikhai...@openlinksw.com>
To: "Jürgen Jakobitsch" <jakobits...@punkt.at>
Cc: "Kingsley Idehen" <kide...@openlinksw.com>,
virtuoso-users@lists.sourceforge.net
Sent: Saturday, February 6, 2010 3:32:14 AM
Subject: Re: [Virtuoso-users] CORRECTION 6.1 owl support
Hello Jürgen,
owl:TransitiveProperty inference is enabled only if triple pattern
contains fixed transitive P. It does not work With variable ?p so the
option T_DISTINCT becomes misleading.
Best Regards,
Ivan Mikhailov
OpenLink Software
http://virtuoso.openlinksw.com
On Fri, 2010-02-05 at 23:42 +0100, Jürgen Jakobitsch wrote:
hi kingsley, arigato gozaimasu, so far,
now these queries look really promising on http://lod.openlinksw.com/sparql.
but with
./virtuoso-t -?
Virtuoso Open Source Edition (multi threaded)
Version 6.1.0.3126-pthreads as of Feb 4 2010
Compiled for Linux (i686-pc-linux-gnu)
Copyright (C) 1998-2010 OpenLink Software
and the following query (analog to your sample)
define input:inference "reasoner"
SELECT *
FROM <urn:reasonertest>
WHERE
{
<http://www.turnguard.com/ElectroPop> ?p ?o OPTION (T_DISTINCT).
}
i get
37000 Error SP031: SPARQL compiler: Transitive-specific options can be
specified only for group patterns, not for triple patterns
and with
define input:inference "reasoner"
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT *
FROM <urn:reasonertest>
WHERE
{
<http://www.turnguard.com/ElectroPop> skos:related ?o OPTION (T_DISTINCT).
}
i get
37000 Error SP031: SPARQL compiler: Options are not supported for a triple pattern with property name "http://www.w3.org/2004/02/skos/core#related" that is
declared in inference rules "reasoner" as a property with inverse
so i can't test with own data.
do i have the latest changes with a sourceforge download and install from the
4th of feb?
i might have taken a bad built or some, i also noted that in
conductor->rdf->graphs i only have
one : http://www.openlinksw.com/schemas/virtrdf#
i also realized that you put A- and T-box in one graph - is this optional or a
must?
your efforts really appreciated
wkr turnguard
----- Original Message -----
From: "Kingsley Idehen" <kide...@openlinksw.com>
To: "Kingsley Idehen" <kide...@openlinksw.com>
Cc: "Jürgen Jakobitsch" <jakobits...@punkt.at>,
virtuoso-users@lists.sourceforge.net
Sent: Friday, February 5, 2010 8:46:48 PM
Subject: CORRECTION [Virtuoso-users] 6.1 owl support
Kingsley Idehen wrote:
Jürgen Jakobitsch wrote:
Just realized the last owl:inverseOf query is incorrect. It should be:
## Test owl:inverseOf Reasoning
## Should show triples exposing the inverseOf relation.
## In this case rel:employedBy instance data triples exist, the system
must infer rel:employerOf triples
DEFINE input:inference 'urn:owl.tests'
PREFIX rel: <http://purl.org/vocab/relationship/>
SELECT *
FROM <urn:owl.tests>
WHERE {?s rel:employerOf ?o}
Kingsley
hi, again.
there might be a fundamental difference about the view
what inference is or i'm fundamentaly misusing virtuoso
- i have to confess that i'm spoiled by owlim.
here's exactly what i do :
1. DB.DBA.RDF_LOAD_RDFXML (http_get
('http://www.w3.org/2009/08/skos-reference/skos-owl1-dl.rdf'), 'no',
'urn:rules.skos');
2. DB.DBA.RDF_LOAD_RDFXML (http_get ('http://www.w3.org/2002/07/owl.rdf'),
'no', 'urn:rules.skos');
3. DB.DBA.RDF_LOAD_RDFXML (http_get
('http://turnguard.com/virtuoso/test10.rdf'), 'no',
'http://www.turnguard.com/virtuoso');
4. rdfs_rule_set ('skos-inference', 'urn:rules.skos');
(note: test10.rdf is more or less the same data i sent two mails ago, i added
one concept with a skos:related property,
please open in a browser and take a look, the following queries are about these
five concepts)
now if i do :
Query :
define input:inference "skos-inference"
SELECT *
FROM <http://www.turnguard.com/virtuoso>
WHERE
{
<http://www.turnguard.com/ElectroPop> ?p ?o
}
Expected :
Expected result with support for symmetricProperty would include http://www.turnguard.com/KrautRock
(Solution : <http://www.turnguard.com/ElectroPop> skos:related <http://www.turnguard.com/KrautRock>)
Expected result with support for inverseOf would include
(Solution : <http://www.turnguard.com/ElectroPop> skos:broader <http://www.turnguard.com/TechnoPop>)
at least these two solutions are missing.
essentially i get the exact same results as with the previous release (6.0.)
the only thing that
for sure works as expected is rdfs:subPropertyOF
all these tests were made on
./virtuoso-t -?
Virtuoso Open Source Edition (multi threaded)
Version 6.1.0.3126-pthreads as of Feb 4 2010
Compiled for Linux (i686-pc-linux-gnu)
Copyright (C) 1998-2010 OpenLink Software
with a complete fresh installation and newly imported data.
any idea really appreciated
wkr turnguard
Okay, think we found out what amiss here, basically missing docs re. the
use of the Transitive Option when using this inference feature.
You can test the no SPARUL and Rule Creation bits via the following
endpoints:
1. http://lod.openlinksw.com/sparql
2. http://uriburner.com/sparql
Example based on Relationship Vocab:
## Verify Ontology Data is in Quad Store by using Sponger pragmas to
re-load cache if missing
## Ontology: <http://vocab.org/relationship/> (Relationship Ontology)
DEFINE get:soft "replace"
SELECT *
FROM <http://vocab.org/relationship/>
WHERE {?s ?p ?o}
## Clean up instance data graph
CLEAR GRAPH <urn:owl.tests.data>
## Create Instance Data for Relationship Ontology
PREFIX rel: <http://purl.org/vocab/relationship/>
INSERT into GRAPH <urn:owl.tests>
{<http://kingsley.idehen.name/dataspace/person/kidehen#this>
rel:employedBy <http://www.openlinksw.com/dataspace/organization#this>.
<http://myopenlink.net/dataspace/person/tthibodeau#this> rel:worksWith
<http://kingsley.idehen.name/dataspace/person/kidehen#this>.
<http://kingsley.idehen.name/dataspace/person/kidehen#this>
rel:worksWith <http://demo.openlinksw.com/dataspace/person/demo#this>.}
## Verify instance data graph has expected data
SELECT *
FROM <urn:owl.tests> where {?s ?p ?o}
-- SQL mode
-- Create Inference Rule that references the Relationship Ontology Named
Graph
rdfs_rule_set ('urn:owl.tests', 'http://vocab.org/relationship') ;
-- Verify rule creation (just a double check)
SELECT * FROM sys_rdf_schema ;
## Back to RDF realm
## Test owl:TransitiveProperty Reasoning
## Start with a specific URI
## Goal: See inferred Triples
## In this case, relationship between:
<http://myopenlink.net/dataspace/person/tthibodeau#this>
## and <http://demo.openlinksw.com/dataspace/person/demo#this>)
## NOTE: use of the Transitivity Option re. (T_DISTINCT)
DEFINE input:inference 'urn:owl.tests'
PREFIX rel: <http://purl.org/vocab/relationship/>
SELECT *
FROM <urn:owl.tests>
WHERE {
<http://myopenlink.net/dataspace/person/tthibodeau#this>
rel:worksWith ?o OPTION (T_DISTINCT)
}
## OR
## Should get all combinations of workWith relationships in solution
## Including the inferred triple
DEFINE input:inference 'urn:owl.tests'
PREFIX rel: <http://purl.org/vocab/relationship/>
SELECT ?o ?o2
FROM <urn:owl.tests>
WHERE {
<http://myopenlink.net/dataspace/person/tthibodeau#this>
rel:worksWith ?o OPTION (T_DISTINCT).
?o rel:worksWith ?o2 OPTION (T_DISTINCT).
}
## Test owl:SymmetricalProperty Reasoning
## Should show same data irrespective of worksWith data in Subject or
Object slots of Triple
DEFINE input:inference 'urn:owl.tests'
PREFIX rel: <http://purl.org/vocab/relationship/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT *
FROM <urn:owl.tests>
WHERE {<http://kingsley.idehen.name/dataspace/person/kidehen#this>
rel:worksWith ?o OPTION (T_DISTINCT)}
## OR
DEFINE input:inference 'urn:owl.tests'
PREFIX rel: <http://purl.org/vocab/relationship/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT *
FROM <urn:owl.tests>
WHERE {?s rel:worksWith
<http://kingsley.idehen.name/dataspace/person/kidehen#this> OPTION
(T_DISTINCT)}
## Test owl:inverseOf Reasoning
## Should show triples exposing the inverseOf relation.
## In this case rel:employerOf instance data triple exist, so the system
should add the inverse triples for rel:employedBy
DEFINE input:inference 'urn:owl.tests'
PREFIX rel: <http://purl.org/vocab/relationship/>
SELECT *
FROM <urn:owl.tests>
WHERE {?s rel:employedBy ?o}
Conclusion:
Due to docs trailing the release the need for Transitivity option wasn't
clear :-)
Kingsley
----- Original Message -----
From: "Kingsley Idehen" <kide...@openlinksw.com>
To: "Jürgen Jakobitsch" <jakobits...@punkt.at>
Cc: virtuoso-users@lists.sourceforge.net
Sent: Thursday, February 4, 2010 3:34:03 PM
Subject: Re: [Virtuoso-users] 6.1 owl support
Jürgen Jakobitsch wrote:
hi,
first, congrats to the new release and the many improvements.
is there a doc or could you shed some light on how i would
have to understand support for owl:SymmetricProperty, owl:inverseOf
and owl:TransitiveProperty?
any pointer really appreciated
wkr turnguard
Sure, we're still rolling things out, but stay tuned for examples.
BTW - this simply means that you can have the assertions in an OWL graph
that is used for an Inference Rules context (as per usual), then when
you SPARQL (with inference rules pragma) see the effects on the solution
based on the inference context.
--
Regards,
Kingsley Idehen
President & CEO
OpenLink Software
Web: http://www.openlinksw.com
Weblog: http://www.openlinksw.com/blog/~kidehen
Twitter: kidehen
Problem:
Misleading error message from Virtuoso:
SQLState: 37000
Message: SQ074: Line 9: SP031: SPARQL compiler: Options are not
supported for a triple pattern with property name
"http://www.w3.org/2004/02/skos/core#related" that is declared in
inference rules "urn:owl.test2.rules" as a property with inverse
Should state: skos:related isn't Transitive
Background: Recent SKOS changes dropped Transitivity for skos:related
and move to skos:broaderTransitive or skos:narrowerTransitive.
Revised Query:
DEFINE input:inference "urn:owl.test2.rules"
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT *
FROM <http://turnguard.com/virtuoso/test10.rdf>
WHERE
{
<http://www.turnguard.com/ElectroPop> skos:broaderTransitive ?o OPTION
(T_DISTINCT).
}
For Others re. alternative example using SKOS re. new Virtuoso Inference
Capabilities follow:
## Cleanup
CLEAR GRAPH <urn:owl.test2.tbox>
CLEAR GRAPH <http://turnguard.com/virtuoso/test10.rdf>
##Load Instance Data into Quad Store
## PL Procedure
-- SQL realm
DB.DBA.RDF_LOAD_RDFXML (http_get
('http://www.w3.org/2009/08/skos-reference/skos-owl1-dl.rdf'), 'no',
'urn:owl.test2.tbox');
DB.DBA.RDF_LOAD_RDFXML (http_get ('http://www.w3.org/2002/07/owl.rdf'),
'no', 'urn:owl.test2.tbox');
--DB.DBA.RDF_LOAD_RDFXML (http_get
('http://www.w3.org/2004/02/skos/core'), 'no', 'urn:owl.test2.tbox');
DB.DBA.RDF_LOAD_RDFXML (http_get
('http://turnguard.com/virtuoso/test10.rdf'), 'no',
'http://turnguard.com/virtuoso/test10.rdf');
## Check re. skos:related
select * from <http://www.w3.org/2004/02/skos/core> where {?s ?p ?o
filter regex(str(?o), ".*related*")}
##
select * from <http://www.w3.org/2004/02/skos/core>
where {
{<http://www.w3.org/2004/02/skos/core#related> ?p ?o}
union
{?s ?p <http://www.w3.org/2004/02/skos/core#related> }
}
##Create Rules
-- SQL Realm
rdfs_rule_set ('urn:owl.test2.rules', 'urn:owl.test2.tbox');
##Transitivity Query re. SKOS concept hierarchy
DEFINE input:inference "urn:owl.test2.rules"
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT *
FROM <http://turnguard.com/virtuoso/test10.rdf>
WHERE
{
<http://www.turnguard.com/ElectroPop> skos:broaderTransitive ?o OPTION
(T_DISTINCT).
}
--
Regards,
Kingsley Idehen
President & CEO
OpenLink Software
Web: http://www.openlinksw.com
Weblog: http://www.openlinksw.com/blog/~kidehen
Twitter/Identi.ca: kidehen