让所有的*文章与精确的时间
问题描述:
一些*文章在信息框精确的时间,像这样:让所有的*文章与精确的时间
https://en.wikipedia.org/wiki/Apollo_11
(成立日期:1969年7月16日13时32分00秒UTC)
或:
https://en.wikipedia.org/wiki/Remembrance_Day_bombing
(日期:1987年10:43 11月8日(GMT))
有没有办法让所有类似的文章的列表?似乎可能与SPARQL
答
AFAIK这是可能的,但它需要知道什么维基财产链接到信息框的日期(或日期时间)字段;让我用一个例子解释:
PREFIX : <http://dbpedia.org/resource/>
PREFIX time-of-spacecraft-launch: <http://www.wikidata.org/entity/P619c>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?entity_label, ?property_label, ?time_of_spacecraft_launch WHERE {
:Apollo_11 owl:sameAs ?wikidata_entity .
?wikidata_entity time-of-spacecraft-launch: ?time_of_spacecraft_launch .
?wikidata_entity rdfs:label ?entity_label .
?wke_prop ?property_rel time-of-spacecraft-launch:.
?wke_prop rdfs:label ?property_label .
FILTER (LANG(?property_label)='en' && LANG(?entity_label)='it')
}
现在我们可以凝胶都用同一种信息的文章简单地通过Apollo_11去除where条件:
PREFIX : <http://dbpedia.org/resource/>
PREFIX time-of-spacecraft-launch: <http://www.wikidata.org/entity/P619c>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?entity_label, ?property_label, ?time_of_spacecraft_launch WHERE {
?wikidata_entity time-of-spacecraft-launch: ?time_of_spacecraft_launch .
?wikidata_entity rdfs:label ?entity_label .
?wke_prop ?property_rel time-of-spacecraft-launch:.
?wke_prop rdfs:label ?property_label .
FILTER (LANG(?property_label)='en' && LANG(?entity_label)='it')
}
在某些情况下可能有助于简化查询:
PREFIX : <http://dbpedia.org/resource/>
PREFIX time-of-spacecraft-launch: <http://www.wikidata.org/entity/P619c>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * WHERE {
?wikidata_entity time-of-spacecraft-launch: ?time_of_spacecraft_launch .
?wikidata_entity rdfs:label ?entity_label .
FILTER (LANG(?entity_label)='en')
}
ORDER BY DESC(?time_of_spacecraft_launch)
你可以看看DBpedia中的资源,并看到有从*的信息框提取没有这样的属性:http://dbpedia.org/resource/Apollo_11 – AKSW