目前尚不完全清楚您的意思是通過製作兩個屬性un -equal。默認情況下,兩個屬性可以是不同的,所以你不必對做任何特殊的處理,讓它們不等於。如果問題得到澄清,那麼可能會增加更多的信息。
這不是完全瑣碎的說,例如,
∀ A,X。 A(一)→(hasFinish(A,X)⇔ hasColor(A,X))
在OWL
,但你可以做到這一點。如果你想對所有班級說這個,你可以像你指出的那樣使用owl:equivalentProperty
。現在,當你說p
是等效的屬性r
,你也可以說,
P⊑ r
r⊑ p
也就是說,p
和r
的每一個都是另一個的子屬性。在OWL 2(但不幸的是,不是OWL 2 DL,如安東尼齊默爾曼在評論中指出的),你可以斷言一個屬性是一個鏈性質的,例如一個超性質,
hasFather• hasBrother⊑ hasUncle
其中說,如果某人有一個有兄弟的父親,那麼這個父親的兄弟就是那個人的叔叔。
還有一個叫做rolification的概念,在OWL 2 rolification中有更多描述,它是創建一個屬性的過程,該屬性對應於一個類,該類將該類的每個個體與自身相關聯。對於你甲類,將有一個關係- [R 甲,其涉及每個甲其自身,並且僅涉及那些實例。如果你再看看一個物業鏈如
R A• hasFinish
你會發現它的真正hasFinish的子屬性,其中第一個參數是一個。這意味着,你可以說hasFinish和hasColor是A類相同通過做兩個子屬性斷言:
[R 一個及子彈; hasColor⊑ hasFinish
R A• hasFinish⊑ hasColor
這些假設類型A的個人是這些陳述的主題。如果A實際上是此處的範圍,那麼您只需使用
∀ a,x。 A(a)→ hasFinish(x,a)⇔ hasColor(x,a))
hasColor• R A⊑ hasFinish
hasFinish• R A⊑ hasColor
獲取屬性[R 一個,你需要一個≡ ∃ [R 一個 .Self
添加定義
你的本體。在門徒新,這將是這樣的:
![enter image description here](https://i.stack.imgur.com/NZVfL.png)
所得本體的樣子(在RDF/XML):
<rdf:RDF
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="http://example.org/ep#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<owl:Ontology rdf:about="http://example.org/ep"/>
<owl:Class rdf:about="http://example.org/ep#A">
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty>
<owl:ObjectProperty rdf:about="http://example.org/ep#R_A"/>
</owl:onProperty>
<owl:hasSelf rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>true</owl:hasSelf>
</owl:Restriction>
</owl:equivalentClass>
</owl:Class>
<owl:ObjectProperty rdf:about="http://example.org/ep#hasFinish">
<owl:propertyChainAxiom rdf:parseType="Collection">
<owl:ObjectProperty rdf:about="http://example.org/ep#R_A"/>
<owl:ObjectProperty rdf:about="http://example.org/ep#hasColor"/>
</owl:propertyChainAxiom>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="http://example.org/ep#hasColor">
<owl:propertyChainAxiom rdf:parseType="Collection">
<owl:ObjectProperty rdf:about="http://example.org/ep#R_A"/>
<owl:ObjectProperty rdf:about="http://example.org/ep#hasFinish"/>
</owl:propertyChainAxiom>
</owl:ObjectProperty>
</rdf:RDF>
和烏龜:
@prefix : <http://example.org/ep#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@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#> .
:hasFinish a owl:ObjectProperty ;
owl:propertyChainAxiom (:R_A :hasColor) .
:A a owl:Class ;
owl:equivalentClass [ a owl:Restriction ;
owl:hasSelf true ;
owl:onProperty :R_A
] .
:hasColor a owl:ObjectProperty ;
owl:propertyChainAxiom (:R_A :hasFinish) .
<http://example.org/ep>
a owl:Ontology .
:R_A a owl:ObjectProperty .
當你說他們和B類不一樣時,你的意思是他們不應該有山姆e值(例如,你不能有'b1 hasFinish x; hasColor x')或只是它們不必具有相同的值(例如,'b2 hasFinish x; hasColor y'(with'x!= y')是_permitted_)?兩種關係可以是明顯的,但仍然有重疊。最重要的是,你可能並不需要確定兩個關係是相同的,但實際上它們最終可能具有相同的擴展。 –