2017-05-26 43 views
1

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

下面是文件,这些文件是相似的,并应与部分:

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> 

该链接应该根据名称的相似性来追溯相似的功能。任何想法是怎么回事?

+0

你不应该申报一些输出文件? – AKSW

+0

首先,尝试用['gn:name'](https://app.assembla.com/wiki/show/silk/Link_Specification_Language)替换''。 。 –

+0

并且它是否与''和''一起工作? – AKSW

回答

1

的问题是在国地名的前缀:

这是

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

,而不是

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

发生这种情况,如果你没有发布整个链接规范... – AKSW

+0

顺便说一句,它仍然是错误的答案,因为两条线是完全一样的... – AKSW

+0

你可以接受你自己的答案... –