2011-06-12 66 views
10

我查询dbpedia.org的大本钟与此SPARQL查询的描述:查询DBpedia的英语,只描述(SPARQL)

select ?desc 
where { 
<http://dbpedia.org/resource/Big_Ben> <http://www.w3.org/2000/01/rdf-schema#comment> ?desc 
} 

这将返回描述至少在10个不同的列表语言。我如何指定我只想要英文描述?

+0

BTW。我们如何找到大本网址(一个和确切的) – 2011-06-13 12:50:23

+0

相关问题:http://stackoverflow.com/questions/6747019/how-get-dbpedia-data-in-a-specific-language – 2013-01-13 20:31:37

回答

18

你需要知道的关键是STR()和朗()拉的价值除了文字和语言,所以你可以这样做:

select str(?desc) 
where { 
    <http://dbpedia.org/resource/Big_Ben> <http://www.w3.org/2000/01/rdf-schema#comment> ?desc 
    FILTER (langMatches(lang(?desc),"en")) 
}