Sparql 配置ApacheJena RDF推理机
我正在尝试为ApacheJena设置一个推理器。 但是我不能让它工作 当我有一个skos:browner的skos概念时,我不能通过搜索skos:browner的结果来查询这个概念 目前,我的config.ttl看起来像下面这样。 我是否需要在配置中加载skos的模式以使其工作Sparql 配置ApacheJena RDF推理机,sparql,jena,Sparql,Jena,我正在尝试为ApacheJena设置一个推理器。 但是我不能让它工作 当我有一个skos:browner的skos概念时,我不能通过搜索skos:browner的结果来查询这个概念 目前,我的config.ttl看起来像下面这样。 我是否需要在配置中加载skos的模式以使其工作 ## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 @prefix : <#> . @prefi
## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
@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 tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
## ---------------------------------------------------------------
## Service with only SPARQL query on an inference model.
## Inference model base data is in TDB.
<#service2> rdf:type fuseki:Service ;
rdfs:label "skos" ;
fuseki:name "skos" ;
fuseki:serviceQuery "sparql" ; # SPARQL query service
fuseki:serviceUpdate "update" ;
fuseki:dataset <#dataset> ;
.
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model_inf> ;
.
<#model_inf> a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>
] .
## Base data in TDB.
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "run/databases/skos" ;
# If the unionDefaultGraph is used, then the "update" service should be removed.
# tdb:unionDefaultGraph true ;
.
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#tdbDataset> .
你能提供你的输入样本和你期望的结论吗?我不清楚skos的东西是否可以用于rdfs/owl推理,或者是否需要自定义规则。我记得skos有一个自定义的语义…当然我已经添加了一个数据样本,我是否需要在某处加载skos rdf?
<http://example.com/2>
a skos:Concept ;
skos:broader <http://example.com/1> ;
skos:prefLabel "schaapskooi"@nl .
<http://example.com/1>
a skos:Concept ;
skos:prefLabel "restant landschapstermen"@nl ;