Module Wikidata.Statement

Represents Wikidata Statements.

Rank

type rank =
| Preferred

Assigned to the statement that best represents the consensus.

| Normal

Assigned to all statements by default.

| Deprecated

Assigned to statements known to contain errors.

Represents the rank of a Wikidata Statement. For more information, please visit the Wikidata Help page for Rankings.

"Truthiness"

While not defined in the official glossary, in Wikidata terminology, truthiness is a property of Statements, defined by having the highest rank (that isn't deprecated) for any Statement for a given Property. For example, if an Item Q has two Preferred, one Normal, and one Deprecated Statement for the Property PX, then the two Preferred Statements are considered truthy. If that same Item has three Preferred Statements for the property PY, then all three are considered truthy. And if property PZ of that same item has ten Statements, all Deprecated, then none are considered truthy.

References

type reference = {
hash : string;

Hash that identifies each reference.

snaks : (propertyid * Snak.t list) list;

Associative list between Property IDs and Snaks.

snaks_order : propertyid list;

Order in which the snaks in snaks should be logically displayed.

}

Represents the provenance/authority information for the main Snak and Qualifiers of a Statement. This information is stored as properties associated with Snaks. This closely follows the representation of references in the original JSON as described in the Wikibase JSON specifications.

Statements

type t = {
id : string;

Identifier of the statement.

rank : rank;

Rank of the statement.

mainsnak : Snak.t;

The main Snak (or primary piece of data) this Statement contains.

qualifiers : (propertyid * Snak.t list) list;

The qualifiers of this statement, which add additional context to the statement, represented as an association list between Property IDs and lists of Snaks.

references : reference list;

List of references for this statement.

}

Represents Wikidata Statements.

Conversions

val of_string : string -> t

Converts a JSON string representing a statement as described in the Wikibase JSON Specifications to a t.