SILK框架:限制到SPARQL查询

时间:2017-05-26 09:16:01

标签: xml sparql rdf linked-data

我试图在两个简单的rdf文件上测试SILK框架。我正确导入了两个文件,并创建了一个LinkSpec来生成一个简单的sameAs链接。前缀都是正确的,但是,没有生成链接。

以下是相似且应链接的文件部分:

1

<gn:Feature rdf:about="http://sws.geonames.org/8286635/">
<rdfs:isDefinedBy rdf:resource="http://sws.geonames.org/8286635/about.rdf"/>
<gn:name>Champ de Mars Tour Eiffel Railway Station</gn:name>
<gn:neighbour rdf:resource="http://sws.geonames.org/6254976/"/>
</gn:Feature>

2

<gn:Feature rdf:about="http://sws.geonames.org/8286635/">
<rdfs:isDefinedBy rdf:resource="http://sws.geonames.org/8286635/about.rdf"/>
<gn:name>Champ de Mars Tour Eiffel Railway Station</gn:name>
<gn:neighbour rdf:resource="http://sws.geonames.org/6254976/"/>
</gn:Feature>

以下是应该出现问题的LinkSpec文件:

<Interlinks>
 <Interlink id="link3">
  <SourceDataset dataSource="nearby" var="a" typeUri="RDF/XML">
   <RestrictTo>?c <http://www.geonames.org/ontology#name> ?a .</RestrictTo>
  </SourceDataset>
  <TargetDataset dataSource="neighbour" var="b" typeUri="RDF/XML">
   <RestrictTo>?d <http://www.geonames.org/ontology#name> ?b .</RestrictTo>
  </TargetDataset>
  <LinkageRule linkType="owl:sameAs">
   <Compare id="equality1" required="true" weight="1" metric="equality" threshold="0.0" indexing="true">
    <Input id="sourcePath1" path="/gn:name"/>
    <Input id="targetPath1" path="/gn:name"/>
   </Compare>
   <Filter/>
  </LinkageRule>
  <Outputs>
   <Output id="output"/>
  </Outputs>
 </Interlink>
</Interlinks> 

该链接应该根据他们的名字赶上类似的功能&#39;相似性。知道发生了什么事吗?

1 个答案:

答案 0 :(得分:1)

问题出现在Geonames的前缀中:

<Prefix id="gn" namespace="http://www.geonames.org/ontology#"/>

而不是

<Prefix id="gn" namespace="http://www.geonames.org/ontology#/"/>