Thank you for the hints.
We did just that, using the following detailed steps :
1) Load RDFS schema in a named graph :
SPARQL LOAD <http://www.w3.org/2000/01/rdf-schema#>;
2) Check it has been successfully imported :
SPARQL SELECT * FROM <http://www.w3.org/2000/01/rdf-schema#> WHERE { ?s
?p ?o };
3) Add that subclass is transitive :
SPARQL INSERT INTO <http://www.w3.org/2000/01/rdf-schema#> {
rdfs:subclassOf rdf:type owl:TransitiveProperty . };
4) Check that the triple for successfully added to that local graph :
SPARQL SELECT * FROM <http://www.w3.org/2000/01/rdf-schema#> WHERE { ?s
?p ?o };
5) Created rule set as explained in your message :
rdfs_rule_set('http://example.com/rule_set/rdfs', '
http://www.w3.org/2000/01/rdf-schema');
6) Launch the query using the rule set :
SPARQL DEFINE input:inference 'http://example.com/rule_set/rdfs' PREFIX
rdfs: <http://www.w3.org/2000/01/rdf-schema#> CONSTRUCT { ?c1
rdfs:subClassOf ?c3 . } WHERE { ?c1 rdfs:subClassOf ?c2 . ?c2
rdfs:subClassOf ?c3 . } ;
The inference is performed only one time (and not recursively until a
fix-point is reached).
Would we create a named graph resulting from this query, we could re run it
to get more inferred triples, and so on (which is obviously a performance
hindrance).
Is it possible to perform forward-chaining with full materialization (like
Jena and Owlim) in Virtuoso or did we miss something on the way ?
Thank you in advance,
Julien
2015-05-22 16:06 GMT+02:00 Kingsley Idehen <kide...@openlinksw.com>:
> On 5/22/15 9:16 AM, Julien Subercaze wrote:
>
> Hi,
>
> we are investigating forward chaining reasoning in Virtuoso 7.
> As an example, we tried to infer the transitive closure of the rule scm-sco
> from http://topbraid.org/spin/rdfsplus.html
>
> We only manage to fire the first iteration of the rule with the following
> SPARQL query:
>
>
> SPARQL
>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>
> CONSTRUCT { ?c1 rdfs:subClassOf ?c3 . }
>
> WHERE { ?c1 rdfs:subClassOf ?c2 . ?c2 rdfs:subClassOf ?c3 . } ;
>
>
> Is it possible to compute the fixed-point inference for the rule ?
>
>
> Greetings,
>
> Julien Subercaze
>
>
> Julien,
>
> You have to make an inference rule based on an ontology (e.g. RDF Schema)
> loaded into a local Named Graph. Then in that localized ontology
> (identified by the local graph IRI: <http://www.w3.org/2000/01/rdf-schema>
> <http://www.w3.org/2000/01/rdf-schema#> [derived from its access url])
> you have to add the following relation (since its missing) the local graph
> IRI:
> rdfs:subClassOf rdf:type owl:TransitiveProperty .
>
> Example of rule creation:
> rdfs_rule_set('http://example.com/rule_set/rdfs', '
> http://www.w3.org/2000/01/rdf-schema') .
>
> You reference the rule using a SPARQL Query Pragma:
> DEFINE input:inference 'http://example.com/rule_set/rdfs'
>
>
> Links:
>
> [1]
> https://www.mail-archive.com/virtuoso-users@lists.sourceforge.net/msg05523.html
> -- an example from someone else that had this problem
> [2]
> http://kidehen.blogspot.com/2014/01/demonstrating-reasoning-via-sparql.html
>
> --
> Regards,
>
> Kingsley Idehen
> Founder & CEO
> OpenLink Software
> Company Web: http://www.openlinksw.com
> Personal Weblog 1: http://kidehen.blogspot.com
> Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
> Twitter Profile: https://twitter.com/kidehen
> Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
> LinkedIn Profile: http://www.linkedin.com/in/kidehen
> Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users