dbpedia fetch entitites in language other than english

后端 未结 2 1105
离开以前
离开以前 2021-01-14 02:47

I\'m trying to extract entity dictionary contains person name etc. from dbpedia using sparql.

PREFIX owl: 
PREFIX dbpprop         


        
2条回答
  •  囚心锁ツ
    2021-01-14 03:38

    You are looking for rdfs:label for a name, of course all the names are English, you are looking at the English dbpedia.

    PREFIX owl: 
    PREFIX dbpprop: 
    SELECT distinct *
    WHERE {
        ?person a owl:Person .
        ?person rdfs:label ?name . 
        FILTER(lang(?name) = "fr")
    }
    

    Again, for the second one, if you replace the name with the rdfs: label you can have:

        PREFIX owl: 
        PREFIX dbpprop: 
        SELECT distinct *
            WHERE {
        ?person a owl:Person .
        ?person rdfs:label ?name .
        ?person dbpprop:language .
    }
    

提交回复
热议问题