从dbpedia中获取改编成电影的书籍清单 [英] Fetching a list of books adapted into films from dbpedia

查看:124
本文介绍了从dbpedia中获取改编成电影的书籍清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图从dbpedia的书籍中获取一系列美国电影.这是我到目前为止的内容:

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

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> .
?movie dcterms:subject <http://dbpedia.org/resource/Category:Films_based_on_novels> .
?movie onto:basedOn ?book .
?book a onto:Book .
}

我只得到4个结果.我可以使用另一个属性来获得更多结果吗?

I get only 4 results back. Is there another property I can use to get more results?

推荐答案

第一件事,尝试删除模式的第二行-

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...

请记住,您受DBpedia中数据的限制,而DBpedia中的数据可能没有您认为的那样(例如,并非每部基于小说的电影都被明确地归类,正如您从不同的结果中看到的那样) ),也可能与Wikipedia不同步6个月或更长时间.您可以查看 DBpedia-live ,以获取不断更新的摄取信息.

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.

这篇关于从dbpedia中获取改编成电影的书籍清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆