为什么owl:Restriction推理在Blazegraph中不起作用? [英] Why is owl:Restriction reasoning not working in Blazegraph?

查看:246
本文介绍了为什么owl:Restriction推理在Blazegraph中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Blazegraph中具有以下RDF(摘自此答案):

With the following RDF in Blazegraph (taken from this answer):

:eats rdf:type owl:ObjectProperty .

:Vegetable rdf:type owl:Class ;
       rdfs:subClassOf owl:Thing .

:Vegetarian rdf:type owl:Class ;
        owl:equivalentClass [ rdf:type owl:Restriction ;
                              owl:onProperty :eats ;
                              owl:someValuesFrom :Vegetable
                            ] .

:Carrot rdf:type :Vegetable ,
             owl:NamedIndividual .

:John rdf:type owl:NamedIndividual , owl:Thing ;
      :eats :carrot .

以下SPARQL返回空白:

the following SPARQL is returning blank:

select ?who
where 
{
  ?who a :Vegetarian .       
}

以下是Blazegraph命名空间配置(Blazegraph从命令行作为NanoSparqlServer运行):

Here are the Blazegraph namespace configs (Blazegraph is running as NanoSparqlServer from command line):

com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor    1024
com.bigdata.relation.container  test-ng-2
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-ng-2
com.bigdata.relation.class  com.bigdata.rdf.store.LocalTripleStore
com.bigdata.rdf.store.AbstractTripleStore.quads false
com.bigdata.relation.namespace  test-ng-2
com.bigdata.btree.writeRetentionQueue.capacity  4000
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers  true

我想念什么?

推荐答案

存在一些RDF语法问题,但根本原因是Blazegraph不支持开箱即用的OWL推理.请参阅当前的支持.已经针对ELK推理机进行了一些工作.

There are some RDF syntax issues, but the underlying reason is that Blazegraph does not support OWL Reasoning out of the box. See current support. There has been some work towards and ELK Reasoner.

关于此示例中的RDF,这是经过验证可加载到Blazegraph 1.5.1中的更新.它合并了上面的feedbackup,并添加了名称空间.我使用上面的属性创建了一个属性(test.properties)文件,并使用Sourceforge的可执行jar加载了Blazegraph.

Regarding the RDF in this example, here's an update that is validated to load in Blazegraph 1.5.1. It incorporates the feedbackup above and adds namespaces. I created a properties (test.properties) file with your properties above and loaded Blazegraph with the executable jar from Sourceforge.

java -Xmx2g -Dbigdata.propertyFile=test.properties -jar bigdata-bundled.jar

转到工作台: http://localhost:9999/bigdata/并将下面的RDF粘贴到在工作台上的更新"选项卡上,选择龟"格式的"RDF数据".

Go to the workbench: http://localhost:9999/bigdata/ and paste the RDF below into the "Update" tab on the workbench selecting "RDF Data" with the format "Turtle".

@prefix : <http://stackoverflow.com/> .
@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#> .

:eats rdf:type owl:ObjectProperty .

:Vegetable rdf:type owl:Class ;
   rdfs:subClassOf owl:Thing .

:Vegetarian rdf:type owl:Class ;
   owl:equivalentClass [ rdf:type owl:Restriction ;
                          owl:onProperty :eats ;
                          owl:someValuesFrom :Vegetable
                        ] .

:Carrot rdf:type :Vegetable ,
         owl:NamedIndividual .

:carrot rdf:type owl:NamedIndividual , owl:Thing, :Carrot .

:John rdf:type owl:NamedIndividual , owl:Thing ;
          :eats :carrot .

如果您随后转到查询标签并运行以下命令:

If you then go to the query tab and run something like:

select * where { ?s ?p ?o }

您将看到OWLAxioms词汇表推断出的所有三元组.

You'll see all of the triples inferred by the OWLAxiomsVocabulary.

这篇关于为什么owl:Restriction推理在Blazegraph中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆