Help:Propietats bàsiques de pertinença

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Help:Basic membership properties and the translation is 45% complete.

Introducció

Aquesta pàgina explica les diferències entre les propietats instance of (P31), subclass of (P279) i part of (P361).

Definicions

Per entendre les diferències, és important estar familiaritzat amb els termes instància i classe. Una classe és una abstracció que representa un conjunt (o col·lecció) de coses, que en són les instàncies. Normalment, totes les instàncies que pertanyen a una classe comparteixen un conjunt de propietats, i aquestes propietats caracteritzen la classe.

If all the instances of class A necessarily also belong to class B, then we say A is a subclass of B.

Exemples

Aspectes pràctics

  • An item can be both an instance and a class. An item is an instance if it has an instance of (P31) property. An item is a class if it is the value associated with some other item's instance of (P31) property (or if it has a subclass of (P279) property). For example, Angela Merkel (Q567) is an instance of politician (Q82955), and politician (Q82955) is an instance of profession (Q28640). So the item politician (Q82955) is both a class and an instance.
  • The complete set of instances implied by a class might or might not exist as items within Wikidata.
  • Typically, a class is characterized by a set of properties shared by all instances. The instances differ from each other in the values they have for those properties, but not in the fact of having the properties themselves (although this is not enforced by Wikidata).


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]

Per exemple, tant Atlantic Ocean (Q97) com Pacific Ocean (Q98) són casos de ocean (Q9430). Per tant, a Wikidata escriurem:

  • S'utilitza per afirmar que totes les instàncies d'una classe són instàncies d'una altra[2]
  • Més concretament, és un rdfs:subClassOf[3]
  • Si qualsevol instancia de la classe subjecte no és una instància del valor de la classe, subclass of (P279) no és adient. Es pot utilitzar partially coincident with (P1382) per enllaçar classes que se sobreposen allà on cap d'elles és una subclasse estricta de l'altra.

Diversos exemples:

Un altre exemple:

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:

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).

Transitive properties

La propietat subclass of (P279) és un transitive Wikidata property (Q18647515). És a dir, si una classe A és una subclasse de la classe B, i B és una subclasse de la classe C, aleshores A, de manera implícita, també és una subclasse de C. En general, no cal afegir una declaració a Wikidata afirmant que A és una subclasse de 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.

Per exemple, Lighthouse of Alexandria (Q43244) és un cas de lighthouse (Q39715) i lighthouse (Q39715) és una subclasse de tower (Q12518). Lighthouse of Alexandria (Q43244) és, per tant, un cas de 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.

Les classes també poden ser part d'una altra classe. Per exemple,

L'ús de instance of (P31) en comptes de part of (P361) seria incorrecte en aquest cas perquè human brain (Q492038) no és una persona. Utilitzar subclass of (P279) també seria erroni perquè un cas de human brain (Q492038) (p. ex. Albert Einstein's brain (Q2464312)) no és un cas de la classe Homo sapiens (Q15978631).

Igual que la propietat subclass of (P279), la part of (P361) és un propietat transitiva.

Inverse relations of part of (P361)

  1. 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
  2. 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.

For example,

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

Diferències entre instance of (P31), subclass of (P279) and part of (P361)
Property X Y que vol dir exemple explicació per què no s'ha de fer servir
<X> instance of <Y> instància classe
  • X es un individu (una sola persona o cosa) que pertany a la classe Y
  • X és un exemple concret de la classe Y
  • totes les instàncies de la classe Y comparteixen algunes característiques
  • Y és el conjunt de les seves instàncies (incloent-hi X)
<USS Nimitz> instance of <supercarrier> <USS Nimitz> és un portaavions concret, <superportaavions> és una classe de portaavions que té diverses instàncies (portaavions)
  • subclass of no s'utilitza perquè <USS Nimitz> no és una classe
  • part of no s'utilitza perquè <USS Nimitz> és una instància i la <superportaavions> és una classe; les instàncies no poden formar part de les classes
<People's Republic of China> instance of <sovereign state> <estat sobirà> és un concepte definit per algunes característiques, <Xina> és un objecte que compleix aquestes característiques
  • subclass of no s'utilitza perquè <Xina> és un estat concret
  • part of no s'utilitza perquè les instàncies no poden formar part de les classes
<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 * subclass of no utilitzat perquè el <sol> no és una classe sinó un objecte astronòmic individual
  • part of no utilitzat perquè les no-classes no poden formar part d'una classe
<hatter> instance of <profession> <hatter> és un exemple concret de professió
  • subclass of no s'utilitza perquè <hatter> no és una classe de professions sinó una professió específica (instància)
  • part of no s'utilitza perquè les instàncies no poden formar part de les classes
<Douglas Adams> instance of <human> <Douglas Adams> és una persona humana específica (aquest és un dels casos més comuns de la propietat instance of)
  • subclass of not used because <Douglas Adams> is not a class of people but a single person (instance)
  • part of not used because instances cannot be parts of classes
<X> subclass of <Y> classe classe
  • totes les instàncies de la classe X pertanyen a la classe Y
  • les instàncies d'X també son instàncies d'Y
<supercarrier> subclass of <aircraft carrier> tant <superportaavions> com <portaavions> són classes i la primera inclou la darrera
  • instance of no s'utilitza perquè <superportaavions> no és un objecte concret
  • part of no s'utilitza perquè una instància de <superportaavions> (p. ex. <USS Nimitz>) no pot formar part d'una instància de portaavions (p. ex. <USS Enterprise>)
<sovereign state> subclass of <state> tots dos són classes, la primera té totes les característiques de la darrera i algunes característiques addicionals, i per tant és una subclasse de la darrera
  • instance of no s'utilitza perquè <estat sobirà> no és un estat concret, sinó una classe que inclou tots els estats sobirans
  • part of no s'utilitza perquè una instància d'estat sobirà (p. ex. <Xina>) no pot formar part d'una instància d'estat (p. ex. <Xina>)
<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>
  • instance of not used because <G-class star> is not a single star, but a type of <star>
  • part of not used because the relationship is not one of composition, i.e. individual <G-class star> instances do not join together to make an instance of a <star>.
<X> part of <Y> instància instància
  • la instància X forma part de la instància Y
  • diferents parts d'Y (incloent X) s'agrupen per a formar Y
<USS Nimitz> part of <Carrier Strike Group Eleven> <USS Nimitz> és un portaavions concret, <CSG-11> és un carrier strike group concret, <USS Nimitz> és un dels components del <CSG-11> (el seu vaixell insígnia)
  • instance of no s'utilitza perquè <CSG-11> no és una classe
  • subclass of no s'utilitza perquè cap d'ells no és una classe
<People's Republic of China> part of <Asia> tant <Xina> com <Àsia> són elements geogràfics concrets, <Xina> forma part del continent <Àsia>
  • instance of no s'utilitza perquè <Àsia> és una instància (mentre que <país asiàtic> és una classe, i, per tant, es podria dir que <Xina> és una instància de <país asiàtic>)
  • subclass of no s'utilitza perquè cap d'ells no és una classe
<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
  • instance of not used because the latter is an individual astronomical object, not a generic concept
  • subclass of not used because neither of them is a class
classe classe una instància de la classe X forma part d'una instància de la classe Y <flight deck> part of <aircraft carrier> cada portaavions (instància de <portaavions>) té el seu propi pont de vol (instància de <pont de vol>)
  • instance of no s'utilitza perquè <pont de vol> és una classe, no una instància (només un pont de vol concret, com ara el <pont de vol de l'USS Nimitz>, pot ser una instància)
  • subclass of no s'utilitza perquè una instància del primer (p. ex. <pont de vol de l'USS Nimitz>) no pot ser el mateix que una instància del darrer (p. ex. <USS Nimitz>)
<member state> part of <international organization> una instància de <estat membre> és un component d'una instància de <organització internacional>
  • instance of no s'utilitza perquè el primer és un concepte, no indica cap estat concret (p.ex. <Xina>)
  • subclass of no s'utilitza perquè una instància de <estat membre> no pertany a la classe <organització internacional> (p. ex. Xina no és una organització internacional)
<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
  • instance of not used because <star> is not an example of a <galaxy>
  • subclass of not used because instances of class <star> are not instances of the class <galaxy>
  • Nota: alguns dels exemples anteriors hi són solament com a demostració, i no s'han d'utilitzar a Wikidata perquè hi ha relacions més concretes que cal utilitzar (p. ex., utilitzeu "<Xina> continent <Àsia>" en comptes de "<Xina> part de <Àsia>").

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)...

Differences among has part(s) (P527) and has part(s) of the class (P2670)
Property X Y what it denotes example explanation why not use…
<X> has part(s) <Y> instance instance 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
  • has part(s) of the class not used because <United States Congress> and <United States Senate> are concrete objects
<Solar System> has part(s) <Mars> <Mars> is one of the planets in the <Solar System>
  • has part(s) of the class not used because <Solar System> and <Mars> are concrete objects
class class 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
  • has part(s) of the class not used because <body> and <head> are both classes
<galaxy> has part(s) <star> a <galaxy> has <stars> as one of its parts
  • has part(s) of the class not used because <galaxy> and <star> are both classes
<X> has part(s) of the class <Y> instance class 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
  • has part(s) not used because <University of Cambridge> does not have the class <college of the University of Cambridge> as a part, but instead 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
  • has part(s) not used because <Solar System> does not have the class of <inner planets> as a part, but instead has planets as parts
<Albert Einstein> has part(s) of the class <human brain> <Albert Einstein> had a <human brain> as a part
  • has part(s) not used because <human brain> is a class, not an instance, even if he had just one.

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


References

  1. https://www.w3.org/TR/rdf-schema/#ch_type
  2. https://www.w3.org/TR/rdf-schema/#ch_subclassof
  3. https://www.w3.org/TR/rdf-schema/#ch_subclassof


External links