Commons:Depictor

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Depictor showing images of German mathematician Reinhold Baer.

Use Depictor

Depictor is a Toolforge-hosted web application that allows you to add structured data statements to Wikimedia Commons using a game-like interface. Depictor is designed to be used without a manual, but for some of the more advanced functions this page might be of use.

Depictor

2021 Coolest Tool
Award Winner

in the category
Quality


Tutorial

[edit]

Watch the eight minute tutorial video here.

Philosophy

[edit]
Ruud Gullit, depicted in a 1988 portrait.
Gullit's jersey, not depicting the man in question.

Structured data is fantastic, but we're still a long way for having proper statements on all media files on Commons. Some statements can be added automatically, but crucially the most important statement (depicts, P180) needs manual checking. However, we do have a lot of data that in theory can be used to add depicts statements. A large source of information are media files that don't have a depicts statement, but are located in a category that is linked to a Wikidata item.

A naive approach would be to simply add a depicts statement to all the media files in that category, referencing the Wikidata item linked to a category. Unfortunately there are many exceptions to this role.

Take for instance the category for Ruud Gullit, a famous Dutch football player. This category has around 120 files, many of them portraits of the man in question. But some files don't depict Ruud Gullit but something associated with him, like his FC Chelsea jersey (pictured). The only way to be sure that a picture is actually depicting Ruud Gullit is by manually going through all the files.

Fortunately that can be done pretty quickly with a batch of files. It's so simple that you only need one question (Does this image depict Ruud Gullit?) and three buttons: yes, no and 'skip' if you're not sure. This simple way of interaction also opens up the possibility to present a mobile-friendly interface, so people can do it while waiting for the bus or during a coffee break. Hence, Depictor the app was born.

Technical implementation

[edit]

Depictor is a web-based app written in Javascript using the Vue.js framework and PHP on the backend. At the heart of the system is the process used to serving up candidate images and candidate items. An item is a Wikidata item that has an attached image (P18). A candidate image is a media file from Wikimedia Commons that doesn't have a depicts statement for that specific item.

When you're pressing 'start' you're always running a query. By default, this is all people born in a random year. But it's also possible to create more advanced queries. Access these advanced options by clicking on the 'Show advanced options' link. There you'll find three options:

  • Birth year. This is the same as the default setting, but allows you to provide a specific year.
  • Commons category. By default this will take all media files from a single given category. To search in subcategories enable the checkbox and provide a level of depth. These queries can get slow pretty fast, so start out with 0 or 1 and see if that is enough for your usecase. The 'search subcategories' option will use PetScan underwater for getting the media files.
  • SPARQL query. Here you can provide a complex SPARQL query, which will use the Wikidata query service to get a list of candidate items. See the provided example. Note that the variable names given in the example (?item ?instance ?image ?cat) are required and can't be changed.

All queries will result in an URL that you can bookmark or share. An option not available in the interface but accessible from the URL is making a query by QID.

Challenges

[edit]

Challenges are used to work together on a specific subject. Think of them as little campaigns for specific subjects, e.g. 'depict all cheeses' or 'depict all female politicians from India'. They have their own leaderboard (challenge edits are still counted on the global leaderboard as well).

To create your own challenge you first need to run a regular advanced query using either a category or SPARQL query. This query needs to result in at least 100 candidate images (for a single category) or 10 items. If you're getting that you'll see a 'Create challenge' button on the bottom of the screen. Otherwise you'll see a notice that a query can't be created.

When pressing the 'Create challenge' button you need to add a title of at least 5 characters and a description of at least 25 characters. Optionally you can add a longer description. After hitting the 'Create challenge' button your challenge is ready to be used.

Your challenge will appear on the front page as well in the list of currently running challenges. Challenges on the front page are sorted by last edit. If you don't want your challenge to appear there any longer you can edit your challenge again and set the checkbox to 'archived'. Your challenge is still accessible from the direct URL, but no longer from the front page. Note that only the original creator of the challenge can edit existing challenges (based on username).

Missing features and shortcomings

[edit]

A couple of things that are missing or maybe not working as expected (as of november 2021):

  • The loading of new images can take up to a second or two. This has two main reasons: thumbnail generation of Commons images is unfortunately slow and outdated (see this mailing list message for the technical details). The other reason is that writing a structured data statement is also slow. This could be sped up by rewriting the tool so that edits are done asynchronously, but that takes quite some effort and might lead to other problems, so this will not be done in the near future.
  • Once all files in a Commons category are 'done' the whole category is marked as done in the Depictor database. This means that whenever new images get added to that category those won't show up. This could be fixed by a process that checks periodically whether categories are still really 'done' (e.g. all items have a depicts statement).
  • A 'not depicted' click in the tool will save the result in the database and the image won't show up again. However, that an item is not depicting something isn't saved on Commons because there is no way to indicate using structured data that a statement is not true. Unfortunately there is no easy way to fix this except if the Wikibase data model is changed to support negative or inverted statements or we find another solution.
  • Only challenge authors can 'archive' their challenges, meaning that 'done' challenges might still show up on the homepage.
  • It's not possible to indicate that a depicts statement should be marked as prominent.
  • On iOS Safari users get logged out periodically for unknown reasons.
[edit]

If you have any issues, improvements or comments on Depictor feel free to: