Page MenuHomePhabricator

When saving an image to Wikidata (P18), a semi-automated gadget could suggest to add depicted (P180) on Wikimedia Commons
Open, Needs TriagePublic


When adding an image on Wikidata, it would be nice to have a gadget able to suggest to add the depicted (P180) on Wikimedia Commons too.

Image (P18) on WikidataDepicted (P180) on Wikimedia Commons
Wikidata Barack Obama pick image.png (790×1 px, 168 KB)
Wikimedia Commons Barack Obama depicts.png (1×924 px, 535 KB)

Suggested pseudo-code

  1. (base case) assume that the depicted cannot be proposed
  2. after a Wikidata user saves an image (P18 statement)
    1. query image statements from Wikimedia Commons (API wbgetclaims: example request for this file)
      1. check if the image already has at least one "depicted" (P180) statement
        1. if not:
          1. ✅ assume that the depicted can be proposed in Wikimedia Commons
        2. if yes (this code branch can be omitted in the first version):
          1. check whenever none of the depicted entities is: the original entity (e.g. Barack Obama) or something even more specific (e.g. about cats, let's say kitten, Tibetan cat, etc. · example SPARQL query to find more specific elements)
            1. ✅ assume that the depicted can be proposed in Wikimedia Commons

When we know that the depicted can be proposed in Wikimedia Commons, I expect an OOUI simple message asking something like:

How does this image represent [ENTITY LABEL]?
Buttons: [Normally, or not particularly] · [Main subject]

Then save the statement as not prominent (rank = normal) or (rank = preferred).

(We can also think of a vice-versa gadget from Wikimedia Commons, but this Task is about designing a gadget for Wikidata)

What do you think about?