DBpedia query returns some musicals more than once despite filters

I am trying to use the SPARQL query for DBpedia to retrieve a list of musicals and some related properties. However, despite the use of appropriate filters (as far as I can tell), the results include many musicals more than once. Here is my request:

    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX dbo: <http://dbpedia.org/ontology/>
    PREFIX dbpprop: <http://dbpedia.org/property/>
    SELECT ?label ?abstract ?book ?music ?lyrics
    WHERE { 
        ?play <http://purl.org/dc/terms/subject> <http://dbpedia.org/resource/Category:Broadway_musicals> ;
            rdfs:label ?label ;
            dbo:abstract ?abstract ;
            dbpprop:book ?book ;
            dbpprop:lyrics ?lyrics ;
            dbpprop:music ?music .
        FILTER (LANG(?label) = 'en')    
        FILTER (LANG(?abstract) = 'en')
        FILTER (LANG(?book) = 'en')
        FILTER (LANG(?lyrics) = 'en')
        FILTER (LANG(?music) = 'en')
    }

The resulting list contains many duplicate entries. Query insert here: DBpedia SPARQL Explorer , you will see that starting with "Mama Mia!" there are many duplicates in the list.

Any idea what I'm missing to get unique results without duplicates? Thank!

[Edited by glenn mcdonald to clarify that these are musicals that are "duplicated" here, not triplets.]

+3

Source: https://habr.com/ru/post/1795098/


All Articles