Freebase中的基本概念
来源:https://developers.google.com/freebase/guide/basic_concepts
Graph
Freebase数据以图的数据结构存储,图由边和节点相连组成。
节点使用 /type/object 定义
边使用 /type/link 定义
Topic
Freebase有超过3900万个关于现实世界实体(例如人,地点和事物)的主题,这些主题都对应到图中的节点上,但并不是每一个节点都是主题。(CVT就是非主题节点)
主题类型举例:
- Physical entities, e.g., Bob Dylan, the Louvre Museum, the Saturn planet, to
- Artistic/media creations, e.g., The Dark Knight (film), Hotel California (song), to
- Classifications, e.g., noble gas, Chordate, to
- Abstract concepts, e.g., love, to
Types and Properties
给定任意主题,可以从许多不同的角度去看,例如:
- Bob Dylan was a song writer, singer, performer, book author, and film actor;
- Leonardo da Vinci was a painter, a sculptor, an anatomist, an architect, an engineer, …;
- Love is a book subject, film subject, play subject, poetry subject, …;
- Any city is a location, potentially a tourist destination, and an employer of civil servants.
例如关于Bob Dylan的主题就被分配多个类型:the song writer type, the music composer type, the music artist (singer) type, the book author type, etc. 每个类型都携带了不同的、与类型贴合的属性集。例如:
- The music artist type contains a property that lists all the albums that Bob Dylan has produced as well as all the music instruments he was known to play;
- The book author type contains a property that lists all the books Bob Dylan has written or edited, as well as his writing school of thoughts or movement;
Domains and IDs
正如属性被分组到类型中,类型本身也被分组到领域中。每个领域都被赋予一个ID,例如:
/business
is the ID of the Business domain/music
– the Music domain/film
– the Film domain/medicine
– the Medicine domain
每个类型也被赋予一个ID,且这个ID是基于所属领域的。例如,公司类型属于商业领域,它的ID就是 /business/company
。其他例子:
/music/album
is the ID of the (Music) Album type, belonging in the Music domain/film/actor
– the Actor type in the Film domain/medicine/disease
– the Disease type in the Medicine domain
正如类型从其领域继承其ID的开头一样,属性也从其所属的类型继承其ID的开头。例如,公司类型的行业属性(用于指定公司所属的行业)的ID为 /business/company/industry
。其他例子:
/automotive/engine/horsepower
is the ID of the Horsepower property of the (Automotive) Engine type/astronomy/star/planet_s
is the ID of the Planets property of the Star type (used for listing planets around a star)/language/human_language/writing_system
is the ID of the Writing System property of the Human Language type
Compound Value Types(CVT节点)
复合值类型是Freebase中的一种类型,用于表示数据,其中每个条目由多个领域组成。复合值类型或CVT在Freebase中用于表示复杂数据。 起初可能有些混乱,但是CVT是Freebase模式的一个非常重要的组成部分,可以使它更准确地为主题之间的复杂关系建模。
例如:城市人口是随时间变化的,也就是说,当使用Freebase查询人口时,至少暗示了查询某个特定时间的人口。其中涉及两个值,一个人数,一个日期。这种情况下,CVT会变得非常有用。对人口数据建模,需要创建一个主题,将它命名为类似于 “Vancouver’s population in 1997″的东西,然后提交信息。
CVT可以被认为是不需要指定显示名称的主题。 CVT与普通主题一样,具有可以独立引用的GUID。 但是,Freebase客户端看待CVT与普通主题的方式大不相同。 在大多数情况下,CVT的每个属性都应该是消歧属性。
Topic MIDs
通过namespace/key IDs可能会识别出一个主题,也可能不会,但通过一个机器标识符MID,一定可以识别出一个主题,MID是由 /m/
后面跟一个32进制的唯一标识符组成的,主题创建时就会被分配一个MID。
Namespaces, Keys, and Topic IDs
例如, /business
是对应商业领域的命名空间,与商业相关的类型会被给定一个独一无二的key (e.g., company
)。将key附加到命名空间ID上构成类型ID (e.g., /business/company
)。
除了对应领域和类型的命名空间以外,还有其他种类的命名空间,最重要和经常碰到的就是命名空间 /en
(English namespace),它会为最知名的topic提供唯一的key,以形成人类可读的English ID。例如,作品产出很多的Bob Dylan非常有名,以至于Freebase在命名空间 /en
中给这个主题提供了key,所以这个主题的ID是 /en/bob_dylan
,这使我们可以在web client中用更简单的URL去访问这个topic。
例子
• 实体 知识图谱上的节点
• 谓词 连接两个实体的边
• CVT(Compound Value Type) 并不是一个真实的体节点,而是被用来搜集一个事件的多个属性
• 事实
- 三元组,包括一个谓词及其连接着的两实体。
- 事件,通过一个 CVT 节点连接着一组多实体。
Original: https://blog.csdn.net/weixin_41297561/article/details/114288930
Author: 西洋樱草x
Title: Freebase中的基本概念
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/556097/
转载文章受原作者版权保护。转载请注明原作者出处!