valerio.bozzolan created this task.
valerio.bozzolan added a project: Wikidata-Gadgets.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  When adding an image on Wikidata, it would be nice to have a gadget able to 
suggest to add the depicted (P180 <https://phabricator.wikimedia.org/P180>) on 
Wikimedia Commons too.
  
  | Image (`P18`) on Wikidata | → | Depicted (`P180`) on Wikimedia Commons |
  | ------------------------- | - | -------------------------------------- |
  |                           |   |                                        |
  | F35178452: Wikidata Barack Obama pick image.png 
<https://phabricator.wikimedia.org/F35178452>                         | → | 
F35178461: Wikimedia Commons Barack Obama depicts.png 
<https://phabricator.wikimedia.org/F35178461>                                   
   |
  |
  
  
  
  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 
<https://commons.wikimedia.org/w/api.php?action=help&modules=wbgetclaims>: 
example request 
<https://commons.wikimedia.org/w/api.php?action=wbgetclaims&entity=M30087096> 
for this file 
<https://commons.wikimedia.org/w/index.php?title=File:Barack_Obama_with_artistic_gymnastic_McKayla_Maroney_2.jpg&action=info>)
      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 <https://w.wiki/5Cwb>)
            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 
<https://www.mediawiki.org/wiki/OOUI/Windows/Simple_messages> 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?

TASK DETAIL
  https://phabricator.wikimedia.org/T309292

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: valerio.bozzolan
Cc: Aklapper, valerio.bozzolan, dachary, Wikidata-bugs, Ricordisamoa, 
Tacsipacsi, Sjoerddebruin, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to