freebase使用总结

来源:互联网 发布:分布式人工智能 编辑:程序博客网 时间:2024/05/01 07:28

近来公司要从freebase上引用部分数据,所以让我来处理,分析看看那些数据有帮助,并且怎么获取数据。因此花了几天的时间就耗在此上了。

什么是freebase?也许听说过wikipedia的人很多,但听说过freebase的就不那么多了。freebase是一个和wikipedia差不多的东西,这样说可能有点不合适,但此处我的切入点是针对它们之间的结构化数据来说的。它们二者都是提供了大量的结构化数据。大量的数据,数据量的确很大,援引freebase的原话:

Freebase contains at this time of writing more than 10 million topics, more than 3000 types, and more than 30,000 properties. This is not a small database by any measure.

这么大的数据量,很少有人觉得是少量吧。这么些的数据,结构化的,并且是免费的(至少现在为止免费),想必不少人都在打它的主意。

下面就本人这几天的学习体会,做简单的记录,以便将来备忘。

数据模型——更确切些应该换成基本概念才对(Basic Concepts).组成元素Topics Types Properties Domains IDs

话题(topics)  Corresponding to a Wikipedia article is a Freebase topic.说白了就是一些文章,关于某个方面的话题。

类型(type)  因为topics太多了,为了区分开,并且有时候一个话题(topic)属于多个方面多个学科的交汇,所以必须把它们分开,怎么分开呢?就通过类型(type),把它们放入不同的类型里面,查找的时候也方便。要是接触过RDBS(关系数据库)的人就知道,这里的类型和关系数据库的表差不多

属性(Properties)  既然说到了关系数据库的表,那么此处的属性就好理解了,就等同于表中的字段,这都是为了很形象的描述topic的各个方面。

域(Domains)  话题(topic)关通过类型(type)来分配,好像已经很成熟了,但是别忘了这里涉及到的数据两很大,涉及到各行各业,领域很广。因此在type的上面又加了一个域(domain),把各领域给分隔开来。

ID 为了体现出唯一性,所以从逻辑上引入了ID的概念,比如域的唯一性,体现在域名字段命名的唯一上

所以,现在我们可以得出总的视图,域包含类型,类型下面是属性,由各式各样的属性组合在一起就得到某个特定的话题

下面摘自freebase的一段话,做最后的总结

•A type is a conceptual container of related properties commonly needed to describe a certain aspect of a topic.
•A topic can be assigned one or more types (the default type being /common/topic)
•As properties are grouped into types, types are grouped into domains.
•Domains, types, and properties are given IDs in a namespace/key hierarchy.
•Common well-known topics are given IDs in the /en namespace, which are human-readable English strings.
•Topics are uniquely identified within Freebase by GUIDs.
•Properties are multi-value by default, and multi-value properties and single-value properties can be queried in the same way.

参考:

http://www.freebase.com/docs/data/basic_concepts , basic concepts

http://www.freebase.com/app/queryeditor   ,queryeditor

http://www.freebase.com/docs/web_services/search , full text search


原创粉丝点击