知识图谱 Protege 本体构建

Protege 相关资源

  • Protege OWL Tutorial 官方教程 : http://owl.cs.manchester.ac.uk/publications/talks-and-tutorials/protg-owl-tutorial/
  • Protege Wiki 相关说明:https://protegewiki.stanford.edu/wiki/Main_Page

Protege 使用 Manchester syntax

描述逻辑 (DL, Description Logic)

逻辑连接词:用于将多个原子命题组合成复合命题


量词:表示个体数量属性的词

网络本体语言 (OWL, Web Ontology Language)

​ OWL 是 W3C 开发的一种网络本体语言,用于对本体进行语义描述。OWL 通过提供更多具有形式语义的词汇,使之在Web内容的机器可理解性方面要强于XML、RDF和RDF Schema(RDF-S)。OWL 可以当作是 RDFS 的一个扩展,添加了额外的预定义词汇,提供快速、灵活的数据建模能力,高效的自动推理。

OWL 描述属性特征的词汇


OWL 本体映射词汇

Protege 使用 Manchester syntax

​ DL OWL 和 Manchester 语法对应关系如下表:

Protege 本体构建实践

​ 针对一个游戏信息关系构建实体,具体设计的游戏名称、类型、难度和关系等内容如下表所示:

定义本体 IRI 前缀

​ 在 Ontology IRI 定义本体的前缀,如图中被选中内容所示

创建类

​ 创建的所有类都是 Thing 的子类,所以先选中 Thing 类,然后在菜单栏中找到 Tools 下的 Create class ... 进行批量类的创建。

​ 输入类的层次和属性,使用 tabs 缩进表示层级关系。

​ 通过上面编码的方式可以批量创建具有层级关系的类,创建完成结果如下图所示,Entity 页面中包含了初始化类的层次结构、同层级类的关系以及单个类的具体描述。

增加类的关系

​ 属性(property) 是知识图谱中的边:

  • Object property:对象属性连接的节点都有唯一的标志

  • Data property:数据类型属性的主语是具有唯一标志的节点,而连接的另外一个节点是XML的一些基础数据类型

​ 创建对象属性的过程和创建类的方式相似,也可以批量创建如下图所示:

​ 在对象属性的描述 (Description) 中可以定义:描述是公理,对象属性的取值范围

  • Domains:对象属性的主语的类型
  • Ranges:对象属性的宾语的类型

​ 另外,对象属性也可以设置特性 (Characteristics) : 特性是一些推理机制Functional, Inverse functional, Transitive, Symmetric, Asymmetric, Reflexive, Irreflexive

添加公理

​ 除了直接在对象属性中定义公理,也可以在类上添加一些公理。如下图示例中,在subclass 中定义 Chess 可以在 Linux WindowsPlatform 上运行,还可以进行 MultiPlayerGenre


本体保存

Save as 可以将本体保存,可以选择 Turtle Syntax 格式保存,保存后的owl 文件是一个 RDF 格式的文件。

使用构建的本体进行推理

​ 在菜单栏中找打 Reasoner 选择一个推理器,并点击 Configure 确定如下图所示:

​ 然后,再在 Reasoner 中开始推理,如下图所示,最终可以看到 MultiPlayerGame 多出一级 Chess 说明推理出了 Chess 是多人游戏。

本体保存RDF源码

@prefix : <http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1> .<http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1> rdf:type owl:Ontology .#################################################################
#    Object Properties
####################################################################  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#hasDifficulty
:hasDifficulty rdf:type owl:ObjectProperty ;rdfs:subPropertyOf owl:topObjectProperty ;rdfs:domain :Game ;rdfs:range :DifficultyValuePartition .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#hasGenre
:hasGenre rdf:type owl:ObjectProperty ;rdfs:subPropertyOf owl:topObjectProperty ;rdfs:domain :Game ;rdfs:range :Genre .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#hasPlatform
:hasPlatform rdf:type owl:ObjectProperty ;rdfs:subPropertyOf owl:topObjectProperty ;rdfs:domain :Game ;rdfs:range :Platform .#################################################################
#    Classes
####################################################################  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Chess
:Chess rdf:type owl:Class ;rdfs:subClassOf :NameGame ,[ rdf:type owl:Restriction ;owl:onProperty :hasGenre ;owl:someValuesFrom :MultiPlayer] ,[ rdf:type owl:Restriction ;owl:onProperty :hasPlatform ;owl:someValuesFrom :Linux] ,[ rdf:type owl:Restriction ;owl:onProperty :hasPlatform ;owl:someValuesFrom :Windows] .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#DifficultyValuePartition
:DifficultyValuePartition rdf:type owl:Class ;owl:equivalentClass [ rdf:type owl:Class ;owl:unionOf ( :Easy:Hard:Normal)] ;rdfs:subClassOf :ValuePartition .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Easy
:Easy rdf:type owl:Class ;rdfs:subClassOf :DifficultyValuePartition .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Game
:Game rdf:type owl:Class .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Genre
:Genre rdf:type owl:Class .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Hard
:Hard rdf:type owl:Class ;rdfs:subClassOf :DifficultyValuePartition .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Linux
:Linux rdf:type owl:Class ;rdfs:subClassOf :Platform .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#LoL
:LoL rdf:type owl:Class ;rdfs:subClassOf :NameGame .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#MacOSX
:MacOSX rdf:type owl:Class ;rdfs:subClassOf :Platform .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#MultiPlayer
:MultiPlayer rdf:type owl:Class ;rdfs:subClassOf :Genre .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#MultiPlayerGame
:MultiPlayerGame rdf:type owl:Class ;owl:equivalentClass [ owl:intersectionOf ( :Game[ rdf:type owl:Restriction ;owl:onProperty :hasGenre ;owl:someValuesFrom :MultiPlayer]) ;rdf:type owl:Class] .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#NameGame
:NameGame rdf:type owl:Class ;rdfs:subClassOf :Game .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Normal
:Normal rdf:type owl:Class ;rdfs:subClassOf :DifficultyValuePartition .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Online
:Online rdf:type owl:Class ;rdfs:subClassOf :Genre .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Platform
:Platform rdf:type owl:Class .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Puzzle
:Puzzle rdf:type owl:Class ;rdfs:subClassOf :Genre .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#RolePlayGame
:RolePlayGame rdf:type owl:Class ;rdfs:subClassOf :Genre .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#SinglePlayer
:SinglePlayer rdf:type owl:Class ;rdfs:subClassOf :Genre .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Sudoku
:Sudoku rdf:type owl:Class ;rdfs:subClassOf :NameGame .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#ValuePartition
:ValuePartition rdf:type owl:Class .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#Windows
:Windows rdf:type owl:Class ;rdfs:subClassOf :Platform .###  http://www.semanticweb.org/kg/ontologies/2021/2/ganme-ontology-1#WoW
:WoW rdf:type owl:Class ;rdfs:subClassOf :NameGame .#################################################################
#    General axioms
#################################################################[ rdf:type owl:AllDisjointClasses ;owl:members ( :Chess:LoL:Sudoku:WoW)
] .[ rdf:type owl:AllDisjointClasses ;owl:members ( :Easy:Hard:Normal)
] .[ rdf:type owl:AllDisjointClasses ;owl:members ( :Game:Genre:Platform:ValuePartition)
] .[ rdf:type owl:AllDisjointClasses ;owl:members ( :Linux:MacOSX:Windows)
] .[ rdf:type owl:AllDisjointClasses ;owl:members ( :MultiPlayer:Online:Puzzle:RolePlayGame:SinglePlayer)
] .###  Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi

知识图谱 Protege 本体构建相关推荐

  1. 【知识图谱】 一个有效的知识图谱是如何构建的?

    知识图谱以其强大的语义处理能力和开放组织能力,为互联网时代的知识化组织和智能应用奠定了基础,其应用趋势也从通用领域走向行业领域.许多行业为了应对大数据应用的不同挑战,借助知识图谱,实现不同的业务需求, ...

  2. 知识图谱Knowledge Graph构建与应用

    --- 关于举办 2022年数字信息化培训项目系列 --- 知识图谱Knowledge Graph构建与应用研修班线上课程的通知 各有关单位: 一.培训目标: 本次课程安排紧密结合理论与实践,深入浅出 ...

  3. 知识图谱研讨实录07丨肖仰华教授带你读懂知识图谱的众包构建

    以下文章来源于知识工场 ,作者知识工场 知识图谱是一种大规模语义网络,已经成为大数据时代知识工程的代表性进展. 知识图谱技术是实现机器认知智能和推动各行业智能化发展的关键基础技术.由复旦大学肖仰华教授 ...

  4. 时序知识图谱的增量构建

    摘要 带有时序特征的知识图谱(KG)称为时序知识图谱,用来描述知识库中增量式的概念及其相互关系.知识随着时间推移而变化,将新增知识实时.准确地添加到时序知识图谱中,可以实时反映知识的演化更新.对此,给 ...

  5. 如何让你的机器更加聪明?-知识图谱介绍与构建

    近年来,随着人工智能技术在科研和实践中的广泛发展和应用,知识图谱(Knowledge Graph)作为人工智能的重要课题也得到迅速发展. 包含上亿条事实的公开知识图谱已经非常常见,并且不同的数据源又互 ...

  6. 【知识图谱】如何构建知识体系:知识图谱搭建的第一步

    互联网时代,人类在与自然和社会的交互中生产了异常庞大的数据,这些数据中包含了大量描述自然界和人类社会客观规律有用信息.如何将这些信息有效组织起来,进行结构化的存储,就是知识图谱的内容. 知识图谱的难点 ...

  7. 唐刘之辩:行业知识图谱的schema构建的难点、重点与困惑

    一.议题 昨日,阿里达摩院唐呈光老师与我就行业知识图谱的schema的构建对于业务人员是不是有困难以及其中的难点或者耗时点做了一个简短的讨论,我觉得很有趣,发出来与大家一同思考. 唐:唐呈光,阿里巴巴 ...

  8. 柯基数据:先进的知识图谱技术,构建行业知识图谱,助企业打通内部信息孤岛,链接海量数据 |百万人学AI评选

    2020 无疑是特殊的一年,而 AI 在开年的这场"战疫"中表现出了惊人的力量.站在"新十年"的起点上,CSDN[百万人学AI]评选活动正式启动.本届评选活动在 ...

  9. 知识图谱实战:构建红楼梦知识图谱

    本文为数据集整理以及代码存放,本内容已经录制b站课程,如有需要可以前去观看,建议点赞投币- 视频内容简介,最后可以带大家确实做一个知识图谱 b站课程地址:https://www.bilibili.co ...

最新文章

  1. java游戏开发--连连看-让程序运行更稳定、更高效
  2. 重磅 | 中国工程院提出新一代智能制造【附下载】
  3. Symantec Backup Exec System Recovery还原向导
  4. java 大纲,Java学科学习大纲
  5. Cookie利用神器:CookieHacker
  6. mysql5.7初始密码查看及密码重置
  7. recyclerview 加载fragment_恢复 RecyclerView 的滚动位置
  8. 负margin应用案例几则(转载+总结)
  9. 黑盒测试策略及测试范围
  10. sqlinesdata教程_oracle数据库中的表如何能够导入到mysql中?
  11. Mariadb数据库设置及操作 一主多从 备份还原(实测笔记)
  12. 易语言-MD5加密16位和32位方法
  13. 什么是句柄?为什么会有句柄?HANDLE
  14. 【转载】一份不可多得的深度学习技巧指南
  15. 零基础 Java 学习笔记
  16. 【2】输入俩个数m,n,字符串st1为1-m组成,输出字符串的倒数第n个字符
  17. 【武汉加油!中国加油!】挑战七天 实现机器视觉检测有没有戴口罩系统——第四五六七天
  18. 全国计算机等级考试在线报名湖南,『NCRE报名入口』湖南2020年下半年计算机等级报名入口-ncre-bm.neea.cn...
  19. 使用echarts做气泡图
  20. Vue文字走马灯(文字轮播)组件

热门文章

  1. 蛋糕店会员卡充值方案有哪些?
  2. 《吴军阅读与写作讲义》笔记
  3. 天天动听 悬浮歌词(迷你歌词)效果解读 .
  4. 人工智能往哪个方向发展有前途?计算机视觉还是自然语言处理?
  5. 地铁和轻轨的区别, 中国目前有几个城市有地铁
  6. 小米云深度学习平台的架构设计与实现
  7. Easyocr - 3行代码识别图片中的任意语言文字
  8. Java加密 HMACSHA1 加密算法
  9. rpc服务器没响应,windows 2008 RPC 服务器不可用
  10. kalman filter java_Kalman Filter算法详解