gpt4 book ai didi

sparql - Fuseki 猫头鹰推理机无法与 TDB 配合使用

转载 作者:行者123 更新时间:2023-12-02 07:03:35 27 4
gpt4 key购买 nike

这是我的配置文件

# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0

## Fuseki Server configuration file.

@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .

[] rdf:type fuseki:Server ;
fuseki:services (
<#service1>
)
.

# TDB
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .

[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .

<#service1> rdf:type fuseki:Service ;
fuseki:name "rs" ; # http://host:port/ds
fuseki:serviceQuery "sparql" ; # SPARQL query service
fuseki:serviceQuery "query" ; # SPARQL query service (alt name)
fuseki:serviceUpdate "update" ; # SPARQL update service
fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
fuseki:serviceReadWriteGraphStore "data" ; # SPARQL Graph store protocol (read and write)
# A separate read-only graph store endpoint:
fuseki:serviceReadGraphStore "get" ; # SPARQL Graph store protocol (read only)
fuseki:dataset <#dataset> ;
.


<#dataset> rdf:type tdb:DatasetTDB ;
tdb:location "RS" ;
ja:defaultGraph <#model_inf> ;
.


<#model_inf> a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>]
.


<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#RSDataSet> .

<#RSDataSet> rdf:type tdb:DatasetTDB ;
tdb:location "RS" ;
tdb:unionDefaultGraph true ;
.

当我运行fuseki (2.3)时,我可以看到我的数据集使用TDB(不在内存中),我可以上传我的rdf三元组,即使当我关闭fuseki并重新打开它时,三元组在那里,但推理机不起作用

这是我的数据

@prefix : <http://example.org/rs#>
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>

:A rdfs:subClassOf :B .
:B rdfs:subClassOf :C .
:i a :A .

当我执行此查询时

select * where {
:i a ?e
}

我只得到了 :A ,而我应该得到 :B:C

请问我的配置有什么问题吗?

最佳答案

我猜当你运行fuseki时,你可能无法正确加载配置文件。您是否明确要求 fusione 使用您的配置文件?

按照本教程中的说明(http://krr.cs.vu.nl/wp-content/uploads/2013/09/protege-fuseki-yasgui-manual.pdf),我的fuseki运行良好,具有推理能力。请查看第3页,希望您能解决您的问题。

关于sparql - Fuseki 猫头鹰推理机无法与 TDB 配合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36067247/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com