[英]GraphDB owl:equivalentClass infrencing not working. Protege reasoner is able to infer this
I created below ontology using protege and imported exactly into GraphDB.我使用 protege 创建了下面的本体并完全导入到 GraphDB 中。
I've 1 individual "HxH" which is of type "comic" and has country "Japan".我有 1 个个人“HxH”,类型为“漫画”,国家为“日本”。 I've defined "Manga" as owl:equivalentClass to "comic + Japan".我将“Manga”定义为 owl:equivalentClass to “comic + Japan”。
When I run reasoner in protege it is able to infer that HxH is of type Manga .当我在 protege 中运行 reasoner 时,它能够推断出 HxH 是 Manga 类型。 GraphDB doesn't infer this. GraphDB 不会推断出这一点。 It only display explicit triples both in query result and graph overview tab.它只在查询结果和图形概览选项卡中显示显式三元组。
Image from Protege: Protege is able to infer that HxH is of type Manga (yellow highlights)图片来自 Protege: Protege 能够推断出 HxH 属于 Manga 类型(黄色高亮部分)
Sparql query (in graphDB): Sparql 查询(在 graphDB 中):
PREFIX : <http://www.comic.org/o-1#>
select * where {
:HxH?p ?o .
} limit 100
Result of above query:以上查询结果:
p p | o o | |
---|---|---|
1 1个 | rdf:type RDF:类型 | :Comic :漫画 |
2 2个 | rdf:type RDF:类型 | owl:NamedIndividual猫头鹰:命名个人 |
3 3个 | :hasCountryOfOrigin : 有原产国 | :Japan :日本 |
GraphDB couldn't infer HxH is of type Manga. GraphDB无法推断HxH 是 Manga 类型。
Ontology I created (Turtle syntax):我创建的本体(Turtle 语法):
@prefix : <http://www.comic.org/o-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.comic.org/o-1> .
<http://www.comic.org/o-1> rdf:type owl:Ontology .
#################################################################
# Object Properties
#################################################################
### http://www.comic.org/o-1#hasCountryOfOrigin
:hasCountryOfOrigin rdf:type owl:ObjectProperty ,
owl:FunctionalProperty ;
rdfs:domain :Comic ;
rdfs:range :Country .
#################################################################
# Classes
#################################################################
### http://www.comic.org/o-1#Comic
:Comic rdf:type owl:Class ;
owl:disjointWith :Country .
### http://www.comic.org/o-1#Country
:Country rdf:type owl:Class .
### http://www.comic.org/o-1#Manga
:Manga rdf:type owl:Class ;
owl:equivalentClass [ owl:intersectionOf ( :Comic
[ rdf:type owl:Restriction ;
owl:onProperty :hasCountryOfOrigin ;
owl:hasValue :Japan
]
) ;
rdf:type owl:Class
] .
#################################################################
# Individuals
#################################################################
### http://www.comic.org/o-1#HxH
:HxH rdf:type owl:NamedIndividual ,
:Comic ;
:hasCountryOfOrigin :Japan .
### http://www.comic.org/o-1#Japan
:Japan rdf:type owl:NamedIndividual ,
:Country .
### Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi
So,所以,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.