Fetching a list of books adapted into films from dbpedia

前端 未结 1 998
野的像风
野的像风 2021-01-16 20:51

I am trying to fetch a list of American movies adapted from books from dbpedia. This is what I have so far:

PREFIX onto:          


        
相关标签:
1条回答
  • 2021-01-16 21:17

    First thing, try removing the second line of your pattern --

    ?movie dcterms:subject <http://dbpedia.org/resource/Category:Films_based_on_novels> .
    

    You'll get a great many more results from --

    PREFIX onto: <http://dbpedia.org/ontology/>
    PREFIX dcterms: <http://purl.org/dc/terms/>
    
    SELECT * WHERE 
      {
        ?movie  dcterms:subject  <http://dbpedia.org/resource/Category:American_films> ;
                onto:basedOn     ?book .
        ?book   a                 onto:Book .
      }
    

    Have you looked at the descriptions of the results you did get? That will show you the properties you might use...

    Remember that you're limited by the data in DBpedia, which may not have what you think it should (for instance, not every film based on a novel is explicitly categorized as such, as you can see by the different results I got), and may also be 6 or more months out of sync with Wikipedia. You might look at DBpedia-live, for constantly updated ingestion.

    0 讨论(0)
提交回复
热议问题