-->

Wikidata Dumps - Long QIDs

2019-08-12 22:06发布

问题:

While playing with the dump, I came across many entries like the following:

http://www.wikidata.org/entity/Q12258SCD97A47E-A0CA-453F-B01A-DEE8829139BF http://www.wikidata.org/entity/P646v "/m/021821" .

  • what does the Q12258SCD97A47E-A0CA-453F-B01A-DEE8829139BF stand for? it seems to be a QID followed by something else.
  • What does the property: P646v stands for, it doesn't seem to be valid?

回答1:

Each Wikidata item has statements, and each statement consists of a statement property and one or more statement values. Each statement value has a value and additional qualifiers (property plus value) and references (group of one or more properties and values).

One statement property-value pair form a claim. Each claim has unique identifier which is formed from the item id, $ (S) and an UUID ("32 hexadecimal digits displayed in five groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters").

So, in your case the item Q12258 has property P646 with value /m/021821 and form a claim with unique identifier with UUID: CD97A47E-A0CA-453F-B01A-DEE8829139BF.

<property id="P646">
    <claim type="statement" id="Q12258$CD97A47E-A0CA-453F-B01A-DEE8829139BF"></claim>
</property>

If the item has property P646 with more than one value, unique id for each one of the values will be formed.

Properties in Wikidata do not directly correspond to properties in RDF. P646v is RDF property where postfix v means that this property is used for link to the value. Postfix s is used for link to the statement, and for qualifiers and references is used q and r respectively.

An example with Q42 for P26 which has one value, two qualifiers (P580 and P582) and reference:

For simpler RDF exports there is still one RDF property with postfix c. You can find more information in Introducing Wikidata to the Linked Data Web (p.6, Ch.3. Representing Wikidata Content in RDF).



回答2:

Are you sure the property P646v is correct? P646 is the property for Freebase identifiers which matches the format of the data value.

As was answered on the Wikidata mailing list, although the subject URI contains the entity QID, that information shouldn't be relied upon and you should instead follow the edges of the graph. Presumably someplace else in the graph there's a triple that says:

https://www.wikidata.org/wiki/Q12258 http://www.wikidata.org/entity/Q12258SCD97A47E-A0CA-453F-B01A-DEE8829139BF