From: Jim B. <ba...@ne...> - 2015-04-29 01:50:13
|
Hi Kaushik, I do have a reasoner integration I developed that I use with Blazegraph. It is called Owlet: https://github.com/phenoscape/owlet It is an API for SPARQL query expansion by means of an in-memory reasoner. I typically use it with ELK but you can use any OWL API-based reasoner. It is not directly integrated into Blazegraph, but you can incorporate it into a separate application to pre-expand your query before submitting to Blazegraph. I also have a web service application called Owlery which provides a query expansion service using Owlet. One thing to keep in mind is that you must have all the data used by the reasoner loaded into memory in an instance of OWLOntology. This works well for me because I typically only need Tbox reasoning—we have large anatomical ontologies. We query the ontology using a complex class expression (e.g. muscles attached to bones in the head), get all the inferred subclasses, and the retrieve instances tagged with any of those classes from Blazegraph. We don’t actually need to classify our instance data using our ontology, which is what it looks like you’re doing. That will work with Owlet, the only issue is that you will need all your instance data loaded into the reasoner. In my experience the available OWL reasoners are much more scalable for Tbox reasoning vs. giving them a large Abox. Best regards, Jim > On Apr 28, 2015, at 8:04 AM, Bryan Thompson <br...@sy...> wrote: > > Blazegraph does not support owl out of the box. Jim Balhoff (cc) has an ELK reasoner integration that you could use for this. > > @jim: can you provide some pointers to your work? > > Thanks, > Bryan > > On Tuesday, April 28, 2015, Kaushik Chakraborty <kay...@gm...> wrote: > Hi Brad, > > Thanks a lot for the clarification, it worked as I followed your steps. > However, I'm stuck at a simple OWL reasoning as I extend the same instance data. > > - Here's my updated instance data > > @prefix : <http://kg.cts.com/> . > @prefix foaf: <http://xmlns.com/foaf/0.1/> . > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . > @prefix owl: <http://www.w3.org/2002/07/owl#> . > > @prefix org: <http://www.w3.org/ns/org#> . > > > :A rdf:type org:Organization . > > :LeadershipRoles a org:Role . > :AdminRoles a org:Role . > > :ROLE1 a :LeadershipRoles . > :ROLE2 a :LeadershipRoles . > :ROLE3 a :AdminRoles . > > :CEOType a org:Membership ; > owl:equivalentClass [ > a owl:Restriction ; > owl:onProperty org:role ; > owl:someValuesFrom :LeadershipRoles > ] . > > > :139137 rdf:type foaf:Agent ; > rdfs:label "139137" ; > org:memberOf :A ; > org:hasMembership [a org:Membership; org:role :ROLE1,:ROLE3] . > > :139138 rdf:type foaf:Agent ; > rdfs:label "139138" ; > org:memberOf :A ; > org:hasMembership [a org:Membership; org:role :ROLE3] . > > > - As per the above assertions, I should get :139137 to have :CEOType membership if I make this SPARQL query. But I'm not > > prefix : <http://kg.cts.com/> > prefix foaf: <http://xmlns.com/foaf/0.1/> > prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> > prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> > prefix owl: <http://www.w3.org/2002/07/owl#> > prefix org: <http://www.w3.org/ns/org#> > > select distinct ?who > where > { > ?who org:hasMembership :CEOType . > } > > > - However, I am getting right result if I search for exact type i.e. > > prefix : <http://kg.cts.com/> > prefix foaf: <http://xmlns.com/foaf/0.1/> > prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> > prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> > prefix owl: <http://www.w3.org/2002/07/owl#> > prefix org: <http://www.w3.org/ns/org#> > > select distinct ?who > where > { > > ?who org:hasMembership/org:role/rdf:type :LeadershipRoles. > } > > RESULT: > who > <http://kg.cts.com/139137> > > > What am I doing wrong ? > Thanks again for your help and patience. > > On Tue, Apr 28, 2015 at 10:14 AM, Brad Bebee <be...@sy...> wrote: > Kaushik, > > I was able to get your example working using the following steps. I suspect the issue may have been that you had not loaded the ontology data prior to loading the instance data. Please give it a try and let us know if that works. > > Thanks, --Brad > > 1. Create a properties file with your properties (owl_test/test.properties) and started a blazegraph workbench instance. > > java -Xmx2g -Dbigdata.propertyFile=owl_test/test.properties -jar bigdata-bundled-1.5.1.jar > > 2. Loaded the ontology data in the workbench (http://localhost:9999/bigdata/). Under the "Update" tab, I selected "File Path or URL" and pasted in http://www.w3.org/ns/org.n3. > > 3. Loaded the instance data. Also in the workbench "Update" tab, I selected "RDF Data" with the format "Turtle". > > @prefix : <http://kg.cts.com/> . > @prefix foaf: <http://xmlns.com/foaf/0.1/> . > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . > @prefix owl: <http://www.w3.org/2002/07/owl#> . > > @prefix org: <http://www.w3.org/ns/org#> . > > > :A rdf:type org:Organization . > > :139137 rdf:type foaf:Agent ; > rdfs:label "139137" ; > org:memberOf :A . > > 4. Issued the SPARQL Query in the workbench. > > prefix : <http://kg.cts.com/> > prefix foaf: <http://xmlns.com/foaf/0.1/> > prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> > prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> > prefix owl: <http://www.w3.org/2002/07/owl#> > prefix org: <http://www.w3.org/ns/org#> > > select distinct ?s ?w > where > { > ?s org:hasMember ?w . > } > > with the expected results. > > <http://kg.cts.com/A> <http://kg.cts.com/139137> > > > > On Mon, Apr 27, 2015 at 9:33 PM, Bryan Thompson <br...@sy...> wrote: > Ontologies are just data. Use any approach you would use to load the data. > > Bryan > > On Apr 27, 2015 11:04 AM, "Kaushik Chakraborty" <kay...@gm...> wrote: > Hi, > > If I put this RDF data in the Updata panel of NanoSparqlServer: > > @prefix : <http://kg.cts.com/> . > @prefix foaf: <http://xmlns.com/foaf/0.1/> . > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . > @prefix owl: <http://www.w3.org/2002/07/owl#> . > > @prefix org: <http://www.w3.org/ns/org#> . > > > :A rdf:type org:Organization . > > :139137 rdf:type foaf:Agent ; > rdfs:label "139137" ; > org:memberOf :A . > > And then if I make a query like this > > prefix : <http://kg.cts.com/> > prefix foaf: <http://xmlns.com/foaf/0.1/> > prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> > prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> > prefix owl: <http://www.w3.org/2002/07/owl#> > prefix org: <http://www.w3.org/ns/org#> > > select distinct ?s ?w > where > { > ?s org:hasMember ?w . > } > > It should list <http://kg.cts.com/A> and <http://kg.cts.com/139137> respectively as ?s and ?w as per the Organization Ontology (http://www.w3.org/TR/vocab-org/#org:Organization) > > But that's not happening. Clearly the inferencing is not working for Org Ontology. > > Here're my namespace properties: > > com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor 1024 > com.bigdata.relation.container test-import > com.bigdata.journal.AbstractJournal.bufferMode DiskRW > com.bigdata.journal.AbstractJournal.file bigdata.jnl > com.bigdata.journal.AbstractJournal.initialExtent 209715200 > com.bigdata.rdf.store.AbstractTripleStore.vocabularyClass com.bigdata.rdf.vocab.DefaultBigdataVocabulary > com.bigdata.rdf.store.AbstractTripleStore.textIndex false > com.bigdata.btree.BTree.branchingFactor 128 > com.bigdata.namespace.kb.lex.com.bigdata.btree.BTree.branchingFactor 400 > com.bigdata.rdf.store.AbstractTripleStore.axiomsClass com.bigdata.rdf.axioms.OwlAxioms > com.bigdata.service.AbstractTransactionService.minReleaseAge 1 > com.bigdata.rdf.sail.truthMaintenance true > com.bigdata.journal.AbstractJournal.maximumExtent 209715200 > com.bigdata.rdf.sail.namespace test-import > com.bigdata.relation.class com.bigdata.rdf.store.LocalTripleStore > com.bigdata.rdf.store.AbstractTripleStore.quads false > com.bigdata.relation.namespace test-import > com.bigdata.btree.writeRetentionQueue.capacity 4000 > com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers false > > What am I missing here ? > > > ------------------------------------------------------------------------------ > 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 > _______________________________________________ > Bigdata-developers mailing list > Big...@li... > https://lists.sourceforge.net/lists/listinfo/bigdata-developers > > > ------------------------------------------------------------------------------ > 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 > _______________________________________________ > Bigdata-developers mailing list > Big...@li... > https://lists.sourceforge.net/lists/listinfo/bigdata-developers > > > > > -- > _______________ > Brad Bebee > Managing Partner > SYSTAP, LLC > e: be...@sy... > m: 202.642.7961 > f: 571.367.5000 > w: www.systap.com > > Blazegraph™ is our ultra high-performance graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints APIs. MapGraph™ is our disruptive new technology to use GPUs to accelerate data-parallel graph analytics. > > CONFIDENTIALITY NOTICE: This email and its contents and attachments are for the sole use of the intended recipient(s) and are confidential or proprietary to SYSTAP, LLC. Any unauthorized review, use, disclosure, dissemination or copying of this email or its contents or attachments is prohibited. If you have received this communication in error, please notify the sender by reply email and permanently delete all copies of the email and its contents and attachments. > > > > > > -- > Thanks, > Kaushik > > > -- > ---- > Bryan Thompson > Chief Scientist & Founder > SYSTAP, LLC > 4501 Tower Road > Greensboro, NC 27410 > br...@sy... > http://blazegraph.com > http://blog.bigdata.com > http://mapgraph.io > Blazegraph™ is our ultra high-performance graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints APIs. MapGraph™ is our disruptive new technology to use GPUs to accelerate data-parallel graph analytics. > > CONFIDENTIALITY NOTICE: This email and its contents and attachments are for the sole use of the intended recipient(s) and are confidential or proprietary to SYSTAP. Any unauthorized review, use, disclosure, dissemination or copying of this email or its contents or attachments is prohibited. If you have received this communication in error, please notify the sender by reply email and permanently delete all copies of the email and its contents and attachments. > > > |