gpt4 book ai didi

owl - Protégé Ontology 中的开放世界假设

转载 作者:行者123 更新时间:2023-12-04 21:37:26 26 4
gpt4 key购买 nike

我想在 Protege 中模拟电影系列的概念。

这是我的电影三部曲课:
Trilogy Class

以下是“电影系列”类中个人的定义:
Film Series Individual

个人具有三个“hasEpisode”属性。
但是开放世界假设 (OWA) 阻止将此人归入“三部曲”类别。

可能的解决方案:
我可以为电影系列类中的每个人提供一个数据属性,用于指定系列中的电影数量。

但是,我更愿意使用“hasEpisode”对象属性的数量(因为它们已经可用并且意味着更少的维护)。

最佳答案

您需要做的就是声明这三部电影不一样,并断言这是该系列仅有的三部电影。你可以通过说剧集都不同来做到这一点:

第1集≠第2集
第1集≠第3集
第2集≠第3集

并且三部曲只有这些情节:

{theTriology} ⊑ ∀ 有情节。{情节1,情节2,情节3}

您需要两种类型的公理。普遍公理说该系列的每一集都必须是第一集、第二集或第三集。这意味着该系列最多只有三集,但如果这些人中的任何一个实际上相同,它可能会更少。然后不等式说明这些个体都是不同的,这意味着该系列实际上至少有三集。因为它至少有三个,最多三个,所以它必须正好有三个。

这是 Protege 中的样子(注意 TheMatrix 被推断为三部曲):

screenshot from protege

这是本体,如果你想看一看:

@prefix :      <http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix untitled-ontology-38: <http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

untitled-ontology-38:Triology
a owl:Class ;
owl:equivalentClass [ a owl:Class ;
owl:intersectionOf ( untitled-ontology-38:FilmSeries _:b0 )
] .

untitled-ontology-38:FilmSeries
a owl:Class .

_:b0 a owl:Restriction ;
owl:cardinality "3"^^xsd:nonNegativeInteger ;
owl:onProperty untitled-ontology-38:hasEpisode .

untitled-ontology-38:hasEpisode
a owl:ObjectProperty .

<http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38>
a owl:Ontology .

untitled-ontology-38:TheMatrixRevolution
a owl:Thing , owl:NamedIndividual .

untitled-ontology-38:TheMatrixReloaded
a owl:Thing , owl:NamedIndividual .

untitled-ontology-38:TheMatrix
a owl:Thing , owl:NamedIndividual .

[ a owl:AllDifferent ;
owl:distinctMembers ( untitled-ontology-38:TheMatrix untitled-ontology-38:TheMatrixReloaded untitled-ontology-38:TheMatrixRevolution )
] .

untitled-ontology-38:Matrix
a owl:NamedIndividual , untitled-ontology-38:FilmSeries ;
a [ a owl:Restriction ;
owl:allValuesFrom [ a owl:Class ;
owl:oneOf ( untitled-ontology-38:TheMatrixReloaded untitled-ontology-38:TheMatrix untitled-ontology-38:TheMatrixRevolution )
] ;
owl:onProperty untitled-ontology-38:hasEpisode
] ;
untitled-ontology-38:hasEpisode
untitled-ontology-38:TheMatrix , untitled-ontology-38:TheMatrixReloaded , untitled-ontology-38:TheMatrixRevolution .

<rdf:RDF
xmlns:untitled-ontology-38="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<owl:Ontology rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38"/>
<owl:Class rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#FilmSeries"/>
<owl:Class rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#Triology">
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<owl:Class rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#FilmSeries"/>
<owl:Restriction>
<owl:onProperty>
<owl:ObjectProperty rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#hasEpisode"/>
</owl:onProperty>
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
>3</owl:cardinality>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#Matrix">
<rdf:type rdf:resource="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#FilmSeries"/>
<rdf:type>
<owl:Restriction>
<owl:onProperty rdf:resource="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#hasEpisode"/>
<owl:allValuesFrom>
<owl:Class>
<owl:oneOf rdf:parseType="Collection">
<owl:Thing rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrixReloaded">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/>
</owl:Thing>
<owl:Thing rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrix">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/>
</owl:Thing>
<owl:Thing rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrixRevolution">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#NamedIndividual"/>
</owl:Thing>
</owl:oneOf>
</owl:Class>
</owl:allValuesFrom>
</owl:Restriction>
</rdf:type>
<untitled-ontology-38:hasEpisode rdf:resource="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrix"/>
<untitled-ontology-38:hasEpisode rdf:resource="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrixReloaded"/>
<untitled-ontology-38:hasEpisode rdf:resource="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrixRevolution"/>
</owl:NamedIndividual>
<owl:AllDifferent>
<owl:distinctMembers rdf:parseType="Collection">
<owl:Thing rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrix"/>
<owl:Thing rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrixReloaded"/>
<owl:Thing rdf:about="http://www.semanticweb.org/taylorj/ontologies/2015/2/untitled-ontology-38#TheMatrixRevolution"/>
</owl:distinctMembers>
</owl:AllDifferent>
</rdf:RDF>

关于owl - Protégé Ontology 中的开放世界假设,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29260659/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com