Help:基本成员属性
此页简而言之:
|
前言
本頁面旨在解釋 instance of (P31)、subclass of (P279)和part of (P361) 三者的屬性。在釐清三者的差異之前,首先我們要瞭解「個例」(instance)和「分類」(class)這兩個專用名詞。
定義
To understand the differences, it is important to be familiar with the terms instance and class. A class is an abstraction that describes a set (or collection) of things, called its instances. Typically, all the instances belonging to a class share a set of properties, which properties characterize the class.
If all the instances of class A necessarily also belong to class B, then we say A is a subclass of B.
示例
- 分類human (Q5)包含Abraham Lincoln (Q91)、Mahatma Gandhi (Q1001)、Isaac Newton (Q935)等實例。
- 分類lighthouse (Q39715)包含Amrum Lighthouse (Q20669)、Lighthouse of Alexandria (Q43244)等實例。
- 分類ocean (Q9430)包含Atlantic Ocean (Q97)、Pacific Ocean (Q98)等實例。
- 分類public election (Q40231)包含2016 Taiwanese presidential election (Q20683626)等實例。
實作層面
- 每一個項目可以是個例,也可以是分類,也可能兩者皆是。如果項目有 instance of (P31) 屬性則是例。如果項目的值與其他項目的 instance of (P31) 有關聯則是分類,(或者有 subclass of (P279) 屬性)。例如說,Angela Merkel (Q567)是politician (Q82955)的例,所以politician (Q82955)既是例也是分類。
- 完整由分類定義的例也許在維基數據上存在或是不存在
- 一般來說,分類的性質會由所有的例整合而成,例則會由其值來區別,而非自身擁有屬性 (然而在維基數據這邊並不強制)。
The relation between instances with a common feature and a class characterized by this feature is produced with the property instance of (P31). We use instance of (P31) instead of subclass of (P279) when we cannot say anything about instances with such relation. More specifically, it is an rdf:type.[1]
For example, Atlantic Ocean (Q97) and Pacific Ocean (Q98) are both instances of ocean (Q9430). We write therefore on Wikidata:
- Atlantic Ocean (Q97) instance of (P31) ocean (Q9430);
- Pacific Ocean (Q98) instance of (P31) ocean (Q9430).
- Is used to state that all the instances of one class are instances of another[2]
- More specifically, it is an rdfs:subClassOf[3]
- If any instances of the subject class are not instances of the value class, subclass of (P279) is not appropriate. partially coincident with (P1382) may be used to link overlapping classes where neither is a strict subclass of the other.
一些例子:
- human brain (Q492038) subclass of (P279) brain (Q1073)
- brain (Q1073) subclass of (P279) animal organ (Q24060765)
- animal organ (Q24060765) subclass of (P279) organ (Q712378)
另一个例子:
- 分類lake (Q23397)包含Lake Baikal (Q5513)、Lake Erie (Q5492)。
- 分類ocean (Q9430)包含Atlantic Ocean (Q97)、Pacific Ocean (Q98)。
A lake and an ocean are not the same but all their instances share the common feature of being a body of water. Therefore we can use the class body of water (Q15324) to state that:
- lake (Q23397) subclass of (P279) body of water (Q15324);
- ocean (Q9430) subclass of (P279) body of water (Q15324).
Now Lake Baikal (Q5513), Lake Erie (Q5492), Atlantic Ocean (Q97) and Pacific Ocean (Q98) will all be transitive (indirect) instances of body of water (Q15324). In general we can use more abstract objects (like body of water (Q15324)) instead of enumerations (lake (Q23397) and ocean (Q9430)) both: 1. in our statements and 2. in our questions (not covered at this help page).
過渡性屬性
The property subclass of (P279) is a transitive Wikidata property (Q18647515). This means: if a class A is a subclass of class B, and B is a subclass of class C, then A is implicitly also a subclass of C. There is then no general need to add an explicit statement to Wikidata declaring A to be a subclass of C.
For example, tree (Q10884) is a subclass of woody plant (Q757163), and woody plant (Q757163) is a subclass of plant (Q756). Thus tree (Q10884) is implicitly also a subclass of plant (Q756).
Similarly, if item x is an instance of class B, and B is a subclass of class C, then x is implicitly also an instance of C. There is then no general need to add an explicit statement to Wikidata declaring x to be an instance of C.
For example, Lighthouse of Alexandria (Q43244) is an instance of lighthouse (Q39715) and lighthouse (Q39715) is a subclass of tower (Q12518). Lighthouse of Alexandria (Q43244) is thus an instance of tower (Q12518).
The property instance of (P31) is not transitive. Considering the example from above: Angela Merkel (Q567) is an instance of politician (Q82955), and politician (Q82955) is an instance of profession (Q28640), but it would be incorrect to say that Angela Merkel (Q567) is an instance of profession (Q28640).
Inferences based on transitivity do not take qualifiers into account, so instance of (P31) and subclass of (P279) statements must be valid while ignoring any qualifiers; in other words, these statements should not have any restrictive qualifier (Q61719275), or any qualifier that is being used restrictively. For example, if A is often, but not always, a subclass of B, then it is not valid to state that A is a subclass of B with nature of statement (P5102) = often (Q28962312), because this will lead to false inferences.
Items cannot be an instance of another non-class, but they can be part of another non-class. For example, Albert Einstein's brain (Q2464312) is a part of Albert Einstein (Q937). On Wikidata we use part of (P361) for this relation.
类还可以是另一个类的一部分。例如,
The use of instance of (P31) instead of part of (P361) would be wrong here because human brain (Q492038) is not a person. Using subclass of (P279) would also be wrong because an instance of human brain (Q492038) (e.g. Albert Einstein's brain (Q2464312)) is not an instance of the class Homo sapiens (Q15978631).
Like subclass of (P279), part of (P361) is a transitive property.
Inverse relations of part of (P361)
- has part(s) (P527) - is used to say that an instance has as part some other instance or that instances of a class have as part an instance of some other class
- has part(s) of the class (P2670) - is used to say that an instance (never a class) has as part an instance of a class. If the parent item is both an instance and a class, has part(s) of the class (P2670) should not be used.
例如,
- Greek alphabet (Q8216) has part(s) (P527) Α (Q9887) (例-例)
- alphabet (Q9779) has part(s) (P527) letter (Q9788) (分類-分類)
- Greek alphabet (Q8216) has part(s) of the class (P2670) Greek letter (Q19793459) (例-分類)
In the first example, has part(s) (P527) is used because Greek alphabet (Q8216) has as part Α (Q9887). has part(s) (P527) is also used in the second example because instances of alphabet (Q9779) have instances of letter (Q9788) as parts. In the last example, we take has part(s) of the class (P2670) since Greek alphabet (Q8216) has one or more instances of Greek letter (Q19793459) as parts.
示例
Property | X | Y | 表示什么 | 例子 | 說明 | 不適用的時機 |
---|---|---|---|---|---|---|
<X> instance of <Y> | 個例 | 分类 |
|
<USS Nimitz> instance of <supercarrier> | <USS Nimitz> is a single concrete aircraft carrier, <supercarrier> is an aircraft carrier class which has many instances (aircraft carriers) |
|
<People's Republic of China> instance of <sovereign state> | <主权国家>是根据某些特性定义的一个概念,<中国>是一个符合这些特性的具体对象 |
| ||||
<Sun> instance of <G-type main-sequence star> | The <Sun> is a specific star with the spectral characteristics of a G-type main-sequence star, and so is an instance of that class |
| ||||
<hatter> instance of <profession> | <hatter>是一个职业的特定例子 |
| ||||
<Douglas Adams> instance of <human> | <Douglas Adams> is a specific human person (this is one of the most common cases for instance of) |
| ||||
<X> subclass of <Y> | 分类 | 分类 |
|
<supercarrier> subclass of <aircraft carrier> | <超级航空母舰>和<航空母舰>均是类且后者包含前者 |
|
<sovereign state> subclass of <state> | 这两项都是分類,前者是带有所有基本功能并增加了拓展功能的后者,因此前者是后者的子类 |
| ||||
<G-type star> subclass of <star> | every individual G-class star (instances of <G-class star>) is also a star - i.e. belongs to the class <star> |
| ||||
<X> part of <Y> | 個例 | 個例 |
|
<USS Nimitz> part of <Carrier Strike Group Eleven> | <USS Nimitz> is a concrete aircraft carrier, <CSG-11> is a concrete carrier strike group, <USS Nimitz> is one of <CSG-11>'s components (its flagship) |
|
<People's Republic of China> part of <Asia> | <中国>和<亚洲>都是特定的地理特征,<中国>是<亚洲>大陆的一部分 |
| ||||
<Sun> part of <Solar System> | both of them are individual astronomical objects; the solar system is composed of the Sun, planets, and other objects in the Sun's vicinity |
| ||||
等级 | 等级 | an instance of class X is part of an instance of class Y | <flight deck> part of <aircraft carrier> | every aircraft carrier (instance of <aircraft carrier>) has its own flight deck (instance of <flight deck>) |
| |
<member state> part of <international organization> | an instance of <member state> is a component of an instance of <international organization> |
| ||||
<star> part of <galaxy> | a star typically is born and lives within a single galaxy which is made up of many stars and other astronomical objects |
| ||||
|
Here is a table that explains the difference between has part(s) (P527) and has part(s) of the class (P2670).
has part(s) (P527) should be used for class-class and instance-instance relationships.
has part(s) of the class (P2670) should be used for instance-class relationships.
If you see a constraint violation on an item with has part(s) of the class (P2670)...
- If the item is a class and has subclass of (P279), it should use has part(s) (P527) instead of has part(s) of the class (P2670), even if it also has instance of (P31).
- The item may wrongly be a class and should instead be an instance. Remove subclass of (P279) and make sure it has a proper instance of (P31).
Property | X | Y | 表示什么 | 例子 | 解释 | 为何不用... |
---|---|---|---|---|---|---|
<X> has part(s) <Y> | 实例 | 实例 | instance X has instance Y among its parts or components | <United States Congress> has part(s) <United States Senate> | the US Congress has two parts, the House of Representatives and the Senate |
|
<Solar System> has part(s) <Mars> | <Mars> is one of the planets in the <Solar System> |
| ||||
等级 | 等级 | an instance of X has an instance of Y among its parts or components | <body> has part(s) <head> | in general a <body> (anatomical feature) has a <head> as one of its parts |
| |
<galaxy> has part(s) <star> | a <galaxy> has <stars> as one of its parts |
| ||||
<X> has part(s) of the class <Y> | 实例 | 等级 | the specific item X include some instance of class Y among its parts or components | <University of Cambridge> has part(s) of the class <college of the University of Cambridge> | the <University of Cambridge> has colleges as parts |
|
<Solar System> has part(s) of the class <inner planet of the Solar System> | our <Solar System> has one or more <inner planets> in its parts |
| ||||
<Albert Einstein> has part(s) of the class <human brain> | <Albert Einstein> had a <human brain> as a part |
|
Queries
Wikidata Queries can be used to find members of a given class, for example all subclasses of "Literary Work"; a Wikidata Query Builder is available to help.
导航框
See also
參考文獻
- ↑ https://www.w3.org/TR/rdf-schema/#ch_type
- ↑ https://www.w3.org/TR/rdf-schema/#ch_subclassof
- ↑ https://www.w3.org/TR/rdf-schema/#ch_subclassof
外部链接
- Multi-Level Conceptual Modeling: Theory and Applications — explains differences between instance of (P31) and subclass of (P279) under the conceptual framework of multi-level conceptual modelling. Skip to part 4 for Wikidata-related content.
- Collections and Individuals — explains differences between instance of (P31) and subclass of (P279) (in the context of the Cyc (Q1147294) knowledge base)