Friday, March 16, 2007

WP:1.0 assessment scale

Tito's note: This is the first in a series of articles about the Version 1.0 Editorial Team in the English Wikipedia.

As of today, there were a total of 385,469 assessed articles in the English Wikipedia. If we use the figure from Special:Statistics of 1,688,879 articles (sorry, no permalink here), that means that 22.8% of articles have been looked at by someone and classified according to their quality. (If we count the number of unassessed articles that are stored in the 1.0 database, we have 40.7% of the article base covered.) While the proportion of the numbers themselves make for interesting observations, most users do not know where those numbers come from, or how they are processed. Since I was involved in the design of the WP:1.0 bot framework, I thought it would be a good idea to explain how it works. It is quite a fascinating process, if I'm allowed to say so myself... ;)

First the WikiProject needs to do a bit of legwork. The WP1.0 bot uses the Mathbot code, which uses Perl to determine if there were any additions or subtractions to a particular category. Therefore, the vast majority of the processing is just a matter of, "Was an article added to this category? Was one removed? Was there an article in a category that was in a different category yesterday?" Before those operations can be done, the categories to process must, well, exist. Picking on WikiProject Tropical cyclones (as usual), the categories to make are:
  • Category:Hurricane articles by quality
    • Category:FA-Class hurricane articles
    • Category:A-Class hurricane articles
    • Category:GA-Class hurricane articles
    • Category:B-Class hurricane articles
    • Category:Start-Class hurricane articles
    • Category:Stub-Class hurricane articles
    • Category:Unassessed-Class hurricane articles
All the "class" categories must be subcategories of the "by quality" category. Otherwise, the bot will not find them. Also, the bot will not find the entire category tree unless the "by quality" category is itself a subcategory of Category:Wikipedia 1.0 assessments. The WP:1.0 bot reads this category and begins spidering from there.

Projects also have the ability to categorize pages by importance or priority. This is slightly more controversial, (take WikiProject Biography, for example: how can you say that someone is of "Low importance" without upsetting the person?) and is not required. However, for the projects that desire to use this portion of the framework, there's another category setup to do, parallel to the quality categories:
  • Category:Hurricane articles by importance
    • Category:Top-importance hurricane articles
    • Category:High-importance hurricane articles
    • Category:Mid-importance hurricane articles
    • Category:Low-importance hurricane articles
    • Category:No-importance hurricane articles
As with the "by quality" categories, these categories are a tree that needs to be a subcategory of Category:Wikipedia 1.0 assessments. (N.B.: You can have the bot do this for you, but you'll need a neighborhood's friendly admin's help.)

Once this is done, the way most projects feed their articles onto the bot framework is by adding a "class" parameter to their WikiProject banner, and optionally, an "importance" parameter as well. Once the MediaWiki job queue does its thing, all of the articles are in the "Unassessed" category.

Featured articleFA A Good articleGA B Start Stub Unassessed

Hurricane Nora (1997)
Hurricane Katrina
Hurricane Wilma

Assuming for a moment that these articles are brand-new and unassessed (which they aren't), at this point, the bot has still not done its daily run. At about 3:00 UTC that day, the bot starts its run. It reads the category tree, and copies them inside its internal database. The table above is now mirrored in the hard drive of the bot's computer. The bot also spits out a log, and updates both the statistics table for the project, and the global database.

Over the course of the day, these articles are assessed. This is done by updating the parameters on the WikiProject banner. An example of this would be the following, on Talk:Hurricane Katrina:


That same day, the three articles are assessed: Hurricanes Nora and Katrina to FA-Class, and Wilma to B-Class. So, our categories in the wiki are now the following:

Featured articleFA A Good articleGA B Start Stub Unassessed
Hurricane Nora (1997)
Hurricane Katrina

Hurricane Wilma

At this point, the bot runs. Again, all it does is compare the current categories and the previous category snapshot. The bot sees that the FA-Class was formerly empty, and now contains two articles: Hurricane Katrina and Hurricane Nora; the B-Class category contains Hurricane Wilma, and the Unassessed category is now empty. The bot now updates the statistics tables and the log, and updates its own snapshot with the current data.

The internal logic of the bot allows it to see that in these two cases, the articles were upgraded from one class to another, and the log will reflect that. If the bot sees a new article, then the log will also identify it as a new addition. If an article was removed, then the bot will flag its removal in the log as well. A recent modification to the code now allows page moves to be adequately recorded, instead of being recorded as an addition and a deletion.

This is the bot structure that 427 WikiProjects, task forces, Regional noticeboards, etc. use nowadays to monitor article quality and editorial progress. It works flawlessly, except that it cannot scale forever. The bot is now run every other day, as each one of its runs took approximately 36 hours to finish. This bot framework is also used by the Hungarian Wikipedia, and the Spanish Wikipedia as well; so if a friendly developer wants to make this part of the Wikimedia wiki farm's software arsenal, a lot of people would be happy... :)



llywrch said...

One question I've had for a while, Titoxd: many articles have project templates for more than one project. (For example, the article on Influenza has tags from 3 different Wikiprojects -- all of which I think are appropriate.) Does this mean that the article is counted more than one time?

If so, then the number of assessed articles are much lower than we've believed. :-(


Titoxd said...

No; the bot takes care of that double-counting; however, if an article is assessed as A-Class by one project, and as GA-Class by another, then the bot will report it to be A-Class in the global summary table.

David Gerard said...

I must admit here to having been dead wrong. I was absolutely certain that a rating system would require all manner of sophisticated software rubbish. That 1/3 of the articles have been rated is remarkable and marvellous.