How get DBpedia data in a specific language?

跟風遠走 提交于 2019-12-03 19:57:34

问题


i tried this request http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryClass=film&QueryString=transformers&MaxHits=1

but if i want to retrieve info in italian language?

it there another service (similar this) that can?


回答1:


You could use dbpedia SPARQL endpoint to run query. For example:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?film ?description ?film_name WHERE {
    ?film rdf:type <http://dbpedia.org/ontology/Film>.
    ?film foaf:name ?film_name.
    ?film rdfs:comment ?description .
    FILTER (LANG(?description)='it' && ?film_name="Transformers"@en)
}


来源:https://stackoverflow.com/questions/6747019/how-get-dbpedia-data-in-a-specific-language

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!