The basic concept of the knowledge map

This is what I read on to know almost columns https://zhuanlan.zhihu.com/knowledgegraph articles made some notes. Detailed contents can go to the original understanding.

Semantic network (semantic networks)

   With interconnected nodes and edges to represent knowledge. Nodes represent objects, concepts, edges represent relationships between nodes.

   advantage:

     1, easy to understand and display; 2, easy clustering concepts

   Disadvantages:

1, the value of nodes and edges no standard, is completely defined by the user.

2, multi-source data integration is difficult because there is no standard.

3, can not distinguish between concept nodes and object nodes.

4, can not be defined on the nodes and edges of the label (label).

   RDF solves two drawbacks 1 and 2, on the value of nodes and edges did constraints, to develop a unified standard, facilitated the integration of multi-source data.

   RDFS and OWL 3 and 4 overcomes the two disadvantages,

 

Semantic Web (semantic web) and link data (linked data)

       The Semantic Web is a network in order to make the data on a machine-readable become a generic framework proposed. "Semantic" is to use a richer way to express the meaning behind the data, so that the machine can understand the data. "Web" is the hope that these data linked to each other to form a huge information network, the Internet as web pages linked to each other, but the basic unit of data into a smaller size.

 

Mapping knowledge (knowledge graph)

      Mapping knowledge by the body (on Ontology) layer as Schema, RDF data model and a compatible set of structured data.

 

Cornerstone of the knowledge map: RDF

 1, forms of RDF

        RDF (Resource Description Framework), i.e., Resource Description Framework, which is essentially a data model (Data Model). It provides a unified standard for describing physical / resources. Simply put, a method and means to express things. SPO formally expressed as RDF triples, sometimes also referred to a statement (statement), knowledge map, we also call it a knowledge, as shown below.

  

 

         RDF of nodes and edges, the nodes indicates that the entity / resource attribute indicates the side that the relationship between entities and entities and entities and attributes.

2, RDF serialization methods

       RDF representation and types have, then how we create RDF dataset, serialize (Serialization- how to store and transmit data RDF) it? At present, RDF serialization main methods: RDF / XML, N-Triples, Turtle, RDFa, JSON-LD several.

  1. RDF / XML, as the name suggests, is to use the XML format to represent RDF data. The reason for making this method is that XML technology is relatively mature, there are many ready-made tool to store and parse XML. However, it is for RDF, XML format too long, not easy to read, we do not usually use this method to deal with RDF data.
  2. N-Triples, i.e., a plurality of RDF triples to represent a data set, is the most intuitive methods. In the file, each row represents a triple easy parsing and processing machines. Open field mapping knowledge DBpedia is usually to publish the data in this format.
  3. Turtle, should be used most of the RDF serialization way. It is more than RDF / XML is compact and readable better than the N-Triples.
  4. RDFa, namely "The Resource Description Framework in Attributes" , is an extension of HTML5, without changing any display, allowing site builders can mark entity on the page, like a person, place, time, comments and so on. In other words, the RDF data embedded in Web pages, search engines can better resolve unstructured page for some useful structural information. Readers can go to this page feel RDFa, its visual display of the ordinary user sees a page, the browser and search engines see page parsed structured information.
  5. JSON-LD, i.e. "JSON for Linking Data", by way of key-value pairs stored RDF data. Interested readers can refer to this website .

     Ronaldo with examples, which are given N-Triples, and Turtle specifically expressed.

 

example 1: N-Triples:

 1 <http://www.kg.com/person/1> <http://www.kg.com/ontology/chineseName> "罗纳尔多·路易斯·纳萨里奥·德·利马"^^string.
 2 <http://www.kg.com/person/1> <http://www.kg.com/ontology/career> "足球运动员"^^string.
 3 <http://www.kg.com/person/1> <http://www.kg.com/ontology/fullName> "Ronaldo Luís Nazário de Lima"^^string.
 4 <http://www.kg.com/person/1> <http://www.kg.com/ontology/birthDate> "1976-09-18"^^date.
 5 <http://www.kg.com/person/1> <http://www.kg.com/ontology/height> "180"^^int.
 6 <http://www.kg.com/person/1> <http://www.kg.com/ontology/weight> "98"^^int.
 7 <http://www.kg.com/person/1> <http://www.kg.com/ontology/nationality> "巴西"^^string.
 8 <http://www.kg.com/person/1> <http://www.kg.com/ontology/hasBirthPlace> <http://www.kg.com/place/10086>.
 9 <http://www.kg.com/place/10086> <http://www.kg.com/ontology/address> "里约热内卢"^^string.
10 <http://www.kg.com/place/10086> <http://www.kg.com/ontology/coordinate> "-22.908333, -43.196389"^^string.

用Turtle表示的时候我们会加上前缀(Prefix)对RDF的IRI进行缩写。

example 2: Turtle:

@prefix person: <http://www.kg.com/person/> .
@prefix place: <http://www.kg.com/place/> .
@prefix : <http://www.kg.com/ontology/> .

person:1 :chineseName "罗纳尔多·路易斯·纳萨里奥·德·利马"^^string.
person:1 :career "足球运动员"^^string.
person:1 :fullName "Ronaldo Luís Nazário de Lima"^^string.
person:1 :birthDate "1976-09-18"^^date.
person:1 :height "180"^^int. 
person:1 :weight "98"^^int.
person:1 :nationality "巴西"^^string. 
person:1 :hasBirthPlace place:10086.
place:10086 :address "里约热内卢"^^string.
place:10086 :coordinate "-22.908333, -43.196389"^^string.

同一个实体拥有多个属性(数据属性)或关系(对象属性),我们可以只用一个subject来表示,使其更紧凑。我们可以将上面的Turtle改为:

example 3: Turtle:

@prefix person: <http://www.kg.com/person/> .
@prefix place: <http://www.kg.com/place/> .
@prefix : <http://www.kg.com/ontology/> .

person:1 :chineseName "罗纳尔多·路易斯·纳萨里奥·德·利马"^^string;
         :career "足球运动员"^^string;
         :fullName "Ronaldo Luís Nazário de Lima"^^string;
         :birthDate "1976-09-18"^^date;
         :height "180"^^int;
         :weight "98"^^int;
         :nationality "巴西"^^string; 
         :hasBirthPlace place:10086.
place:10086 :address "里约热内卢"^^string;
            :coordinate "-22.908333, -43.196389"^^string.

即,将一个实体用一个句子表示(这里的句子指的是一个英文句号“.”)而不是多个句子,属性间用分号隔开。

3、RDF的表达能力

       RDF的表达能力有限,无法区分类和对象,也无法定义和描述类的关系/属性。我的理解是,RDF是对具体事物的描述,缺乏抽象能力,无法对同一个类别的事物进行定义和描述。就以罗纳尔多这个知识图为例,RDF能够表达罗纳尔多和里约热内卢这两个实体具有哪些属性,以及它们之间的关系。但如果我们想定义罗纳尔多是人,里约热内卢是地点,并且人具有哪些属性,地点具有哪些属性,人和地点之间存在哪些关系,这个时候RDF就表示无能为力了。不论是在智能的概念上,还是在现实的应用当中,这种泛化抽象能力都是相当重要的;同时,这也是知识图谱本身十分强调的。RDFS和OWL这两种技术或者说模式语言/本体语言(schema/ontology language)解决了RDF表达能力有限的困境。

RDF的衣服——RDFS和OWL

 

Guess you like

Origin www.cnblogs.com/aabbcc/p/10994087.html