Fetching a list of books adapted into films from dbpedia

送分小仙女□ 提交于 2019-12-01 14:44:42

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.

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