2011-06-12 67 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")) 
}