Jens Lehmann wrote: > > Hello, > > Kingsley Idehen wrote: >> Jens Lehmann wrote: >>> >> >> We are completing a similar test here based on my response earlier >> this week. > > Was the test successful? > >> I assume you are trying to load the Yago Class Hierarchy? If so, let >> us finish our investigation and then we will have a proper report :-) > > Yago was already loaded into our local Virtuoso instance at that time. > Then we used rdfs_rule_set ('http://dbpedia.org', > 'http://dbpedia.org'); or something similar to enable inferencing, > which returned an out of memory error after a couple of hours. > > Kind regards, > > Jens > > Jens,
The current version of Virtuoso has a number of suboptimal issues relating to the initial Inference implementation that includes: Memory management issues (as you encountered) emanating from heuristics for traversing OWL class hierarchies (tree) when processing inference rules. With the fix we now start from the class hierarchy roots and traverse to the bottom of the OWL tree instead of every superclass using a dynamic hash , which grew exponentially. Thus, Virtuoso now uses a list (array of 100 preallocated elements) for a branch of the OWL tree, and when this fills up it extends dynamically. Also, it now checks for subclass definition presence in inference rules based on a hash instead of a linked list. A new Virtuoso release is imminent, the only hold up right now is the completion of Model Providers for: Jena, Redland, and more than likely Sesame. The pervasiveness of these frameworks has encouraged us to make Virtuoso play as well as can be in each of these realms. The goal is to make Virtuoso's performance and scalability features easier for these communities to exploit. Anyway, the live DBpedia has been updated. Important Note: The injection of Yago Class Hierarchy rules into the current data set is an enhancement to the current DBpedia release. Behind the scenes, there is work underway, aimed at providing an enhanced Class Hierarchy and associated inference rules using UMBEL (which meshes Yago and OpenCyc). Once the next Virtuoso release out, those of you with local installation will be able to do the following via iSQL or the Virtuoso Conductor: --- Load Class Hierarchy into a Named Graph select ttlp_mt (file_to_string_output ('yago-class-hierarchy_en.nt'), '', 'http://dbpedia.org/resource/classes/yago#'); -- Create an Inference Rule that references the Yago Class Hierarchy Named Graph rdfs_rule_set ('http://dbpedia.org/resource/inference/rules/yago#', 'http://dbpedia.org/resource/classes/yago#'); -- Test Queries (* Here I've taken the Owlgres demos and applied them to DBpedia. This also makes for easy juxtaposition of Owlgres [1] and Virtuoso features with regards to OWL based Reasoning*) -- Collection of SPASQL (SPARQL executed within Virtuoso's SQL processor) based verification queries -- -- Query for the "The Lord of the Rings" which is a "Book" as explicitly claimed in the DBpedia data set (instance data) SPARQL PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s FROM <http://dbpedia.org> WHERE { ?s a yago:Book106410904 . ?s dbpedia:name "The Lord of the Rings"@en . }; -- Query aimed at Books via query scoped to the "Publication" class of which it is a subclass in the Yago Hierarchy SPARQL define input:inference 'http://dbpedia.org/resource/inference/rules/yago#' PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s FROM <http://dbpedia.org> WHERE { ?s a yago:Publication106589574 . ?s dbpedia:name "The Lord of the Rings"@en . }; -- # Testing Virtuoso's Full Text Index extension: bif:contains SPARQL define input:inference 'http://dbpedia.org/resource/inference/rules/yago#' PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s ?n FROM <http://dbpedia.org> WHERE { ?s a yago:Publication106589574 . ?s dbpedia:name ?n . ?n bif:contains 'Lord and Rings' }; -- Retrieve all individuals instances of the Book Class SPARQL PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s ?n FROM <http://dbpedia.org> WHERE { ?s a yago:Book106410904 . ?s dbpedia:name ?n . }; -- Retrieve all individuals instances of Publication Class which should include all Books. SPARQL define input:inference 'http://dbpedia.org/resource/inference/rules/yago#' PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s ?n FROM <http://dbpedia.org> WHERE { ?s a yago:Publication106589574 . ?s dbpedia:name ?n . }; Pure SPARQL Examples: - Query aimed at Books via query scoped to the "Publication" class of which it is a subclass in the Yago Hierarchy define input:inference 'http://dbpedia.org/resource/inference/rules/yago#' PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s FROM <http://dbpedia.org> WHERE { ?s a yago:Publication106589574 . ?s dbpedia:name "The Lord of the Rings"@en . } -- Variant of query with Virtuoso's Full Text Index extension: bif:contains define input:inference 'http://dbpedia.org/resource/inference/rules/yago#' PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s ?n FROM <http://dbpedia.org> WHERE { ?s a yago:Publication106589574 . ?s dbpedia:name ?n . ?n bif:contains 'Lord and Rings' } -- Retrieve all individuals instances of the Book Class PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s ?n FROM <http://dbpedia.org> WHERE { ?s a yago:Book106410904 . ?s dbpedia:name ?n . } -- Retrieve all individuals instances of Publication Class which should include all Books. define input:inference 'http://dbpedia.org/resource/inference/rules/yago#' PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia: <http://dbpedia.org/property/> PREFIX yago: <http://dbpedia.org/class/yago/> SELECT ?s ?n FROM <http://dbpedia.org> WHERE { ?s a yago:Publication106589574 . ?s dbpedia:name ?n . } -- Regards, Kingsley Idehen Weblog: http://www.openlinksw.com/blog/~kidehen President & CEO OpenLink Software Web: http://www.openlinksw.com ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Dbpedia-discussion mailing list Dbpedia-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion