Help:Proprietà basilari di appartenenza
Andando al nocciolo della questione:
|
Introduzione
Questa pagina spiega le differenze fra le proprietà instance of (P31), subclass of (P279) e part of (P361). Per comprenderle, è importante aver dimestichezza con i termini "istanza" e "classe".
Definizioni
Per capire le diffreenze, è importante acquisire familiarità con i termini "istanza" e classe". Una classe è un oggetto astratto che rappresenta un insieme di elementi, chiamati le sue istanze. In Normalmente, tutte le istanze che appartengono a una classe condividono un insieme di proprietà che caratterizzano la classe. Le istanze differiscono tra loro per avere valori diversi per le stesse proprietà, ma non nel fatto di averle. Perciò, ogni classe è caratterizzata dall'insieme delle proprietà possibili, ereditate da tutte le sue istanze (nonostante questo non sia imposto da Wikidata).
If all the instances of class A necessarily also belong to class B, then we say A is a subclass of B.
Esempi:
- la classe human (Q5) con le instanze Abraham Lincoln (Q91), Mahatma Gandhi (Q1001), Isaac Newton (Q935), ecc.
- la classe lighthouse (Q39715) con le istanze Amrum Lighthouse (Q20669), Lighthouse of Alexandria (Q43244), ecc.
- la classe ocean (Q9430) con le istanze Atlantic Ocean (Q97), Pacific Ocean (Q98), ecc.
- la classe house cat (Q146) con l'istanza Grumpy Cat (Q7714263), ecc.
- la classe public election (Q40231) con l'istanza 2016 Taiwanese presidential election (Q20683626), ecc.
- La classe $5 con le istanze Abraham Lincoln (Q91), Mahatma Gandhi (Q1001), Isaac Newton (Q935), ecc.
- La classe $1 con le istanze $2, $3, ecc.
- La classe $1 con le istanze $2, $3, ecc.
- La classe $1 con l'istanza $2, ecc.
Aspetti pratici
- Un elemento può essere un'istanza e/o una classe, secondo le relazioni che ha con altri elementi. Un elemento è un'istanza per il semplice fatto di contenere una proprietà $31. Allo stesso modo un elemento è una classe semplicemente per il fatto di essere il valore associato con la proprietà $31 di un altro elemento (o avere la proprietà di sottoclasse).
- Non è sempre garantito che l'insieme completo di istanze appartenenti a una classe sia contenuto come pluralità di elementi in Wikidata.
- Se la logica impone che tutti gli elementi appartenenti alla classe A (a prescindere dal fatto che siano classificati in Wikidata o no) appartengano anche alla classe B, allora la relazione fra A e B sarà chiamata "sottoclasse di". In tal caso si dice che A è una sottoclasse di B.
La relazione tra istanze con una caratteristica comune ed una classe contraddistinta da questa caratteristica è prodotta con la proprietà instance of (P31). Viene utilizzata instance of (P31) invece che subclass of (P279) quando non si può dire nulla riguardo le istanze con questa relazione. Più nello specifico, è un rdf:type.[1]
Per esempio, Atlantic Ocean (Q97) e Pacific Ocean (Q98) sono entrambe istanze di ocean (Q9430). Si scriverà dunque su Wikidata:
Diversi esempi:
- human brain (Q492038) subclass of (P279) brain (Q1073)
- brain (Q1073) subclass of (P279) animal organ (Q24060765)
- animal organ (Q24060765) subclass of (P279) organ (Q712378)
Un altro esempio:
- class lake (Q23397) with instances Lake Baikal (Q5513) and Lake Erie (Q5492);
- classe ocean (Q9430) con istanze Atlantic Ocean (Q97) e Pacific Ocean (Q98).
Un lago e un oceano non sono la stessa cosa ma tutte le istanze condividono la stessa caratteristica di essere un corpo di acqua. Allora possiamo utilizzare la classe body of water (Q15324) per definire che:
- lake (Q23397) subclass of (P279) body of water (Q15324);
- ocean (Q9430) subclass of (P279) body of water (Q15324).
Adesso Lake Baikal (Q5513), Lake Erie (Q5492), Atlantic Ocean (Q97) e Pacific Ocean (Q98) saranno tutte istanze transitive (indirette) di body of water (Q15324). In generale è indicato usare oggetti astratti invece che enumerazioni (lake (Q23397) e ocean (Q9430)) sia: 1. nelle nostre definizioni e 2. nelle domande (questo non è considerato in questa pagina d'aiuto).
Transitive properties
subclass of (P279) è una transitive Wikidata property (Q18647515), il che significa che se un elemento A è un'istanza della classe B e la classe B è una sottoclasse della classe C, allora l'elemento A è implicitamente anche un'istanza della classe C. Non c'è un'esigenza generale che impone di aggiungere una dichiarazione per la relazione A→C in Wikidata.
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.
Per esempio, Lighthouse of Alexandria (Q43244) è un'istanza di lighthouse (Q39715) e lighthouse (Q39715) è una sottoclasse di tower (Q12518). Lighthouse of Alexandria (Q43244) è perciò un'istanza di 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.
Gli elementi non possono essere istanze di un elemento che non è una classe ma possono esserne parti. Per esempio, Albert Einstein's brain (Q2464312) è una parte di Albert Einstein (Q937). Su Wikidata si usa part of (P361) per questa relazione.
Le classi possono essere anche parte di un'altra classe. Per esempio,
In questo caso l'uso di instance of (P31) invece di part of (P361) sarebbe sbagliato perché human brain (Q492038) non è una persona. Anche utilizzare subclass of (P279) non sarebbe stato corretto perché un'istanza di human brain (Q492038) (per esempio Albert Einstein's brain (Q2464312)) non è un'istanza della classe Homo sapiens (Q15978631).
Come subclass of (P279), part of (P361) è una proprietà transitiva.
<span id="Inverse_relations_of_part of (P361)">
Relazioni inverse di 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.
Per esempio,
- Greek alphabet (Q8216) has part(s) (P527) Α (Q9887) (instance-instance)
- alphabet (Q9779) has part(s) (P527) letter (Q9788) (class-class)
- Greek alphabet (Q8216) has part(s) of the class (P2670) Greek letter (Q19793459) (instance-class)
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.
Examples
Property | X | Y | che cosa denota | esempio | spiegazione | perché non usare... |
---|---|---|---|---|---|---|
<X> instance of <Y> | istanza | classe |
|
<USS Nimitz> instance of <supercarrier> | <USS Nimitz> è una portaerei singola e reale, <superportaerei> è una classe di portaerei che ha molte istanze (portaerei) |
|
<People's Republic of China> instance of <sovereign state> | <Stato sovrano> è un concetto definito da alcune caratteristiche, <Cina> è un oggetto che corrisponde a queste caratteristiche |
| ||||
<Sun> instance of <G-type main-sequence star> | Il <Sole> è una stella specifica con le caratteristiche spettrali di una stella della sequenza principale di tipo G, e così è pure una istanza di tale classe | * subclass of non usata perché il <Sole> non è una classe ma un singolo oggetto astronomico
| ||||
<hatter> instance of <profession> | <hatter> è un esempio specifico di una professione |
| ||||
<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> | classe | classe |
|
<supercarrier> subclass of <aircraft carrier> | sia <superportaerei> che <portaerei> sono classi, e la seconda contiene la prima |
|
<sovereign state> subclass of <state> | entrambi sono classi, la prima ha tutte le caratteristiche della prima ed alcune aggiuntive, perciò è una sottoclasse della seconda |
| ||||
<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> | istanza | istanza |
|
<USS Nimitz> part of <Carrier Strike Group Eleven> | <USS Nimitz> è una portaerei reale, <CSG-11> è un gruppo d'attacco reale, <USS Nimitz> è un componente del <CSG-11> (la nave ammiraglia) |
|
<People's Republic of China> part of <Asia> | sia <Cina> che <Asia> sono caratteristiche geografiche specifiche, <Cina> è parte del continente <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 |
| ||||
classe | classe | un'istanza della classe X è parte di un'istanza della classe Y | <flight deck> part of <aircraft carrier> | ogni portaerei (istanza di <portaerei>) ha il proprio ponte di volo (istanza di <ponte di volo>) |
| |
<member state> part of <international organization> | un'istanza di <Stato membro> è una componente di un'istanza di <organizzazione internazionale> |
| ||||
<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 | what it denotes | esempio | spiegazione | perché non usare... |
---|---|---|---|---|---|---|
<X> has part(s) <Y> | istanza | istanza | 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> |
| ||||
classe | classe | 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> | istanza | classe | 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.
navbox
See also
Note
Collegamenti esterni
- 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 — spiega le differenze fra instance of (P31) e subclass of (P279) (nel contesto della Cyc (Q1147294) knowledge base)