DOI: 10.6084/m9.figshare.10248344
title: Wikipedia Articles and Associated WikiProject Templates

description: == wikiproject_to_template.halfak_20191202.yaml ==<br>The mapping of the canonical names of WikiProjects to all the templates that might be used to tag an article with this WikiProject that was used for generating this dump. For instance, the line 'WikiProject Trade: ["WikiProject Trade", "WikiProject trade", "Wptrade"]' indicates that WikiProject Trade (https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Trade) is associated with the following templates:* https://en.wikipedia.org/wiki/Template:WikiProject_Trade* https://en.wikipedia.org/wiki/Template:WikiProject_trade* https://en.wikipedia.org/wiki/Template:Wptrade<br>== wikiproject_taxonomy.halfak_20191202.yaml ==A proposed mapping of WikiProjects to higher-level categories. This mapping has not been applied to the JSON dump contained here. It is based on the WikiProjects' canonical names.<br>== gather_wikiprojects_per_article.py ==Old Python script that built the JSON dump described below for English Wikipedia based on wikitext/wikidata dumps (slow and more prone to errors).<br><br>== gather_wikiprojects_per_article_pageassessments.py ==New Python script to build the JSON dump described below that uses the PageAssessments Mediawiki table in MariaDB and so is much faster and can handle languages beyond Enlgihs much more easily.<br>== labeled_wiki_with_topics_metadata.json.bz2 ==<br>Each line of this bzipped JSON file corresponds with a Wikipedia article in that language (currently Arabic, English, French, Hungarian, Turkish). The intended usage of this JSON file is to build topic classification models for Wikipedia articles.<br>While the English file has good coverage because a more or less complete mapping exists between WikiProjects and topics, the other languages are much more sparse in their labels because they do not cover any WikiProjects in that language that don't have English equivalents (per Wikidata). The other languages are probably best used for supplementation of the English labels or a separate test set that might have a different topic distribution.<br><br>The following properties are recorded:* title: Wikipedia article title in that language<br>* article_revid: Most recent revision ID associated with the article for which a WikiProject asssessment was made (might not be current revision ID)<br>* talk_pid: Page ID corresponding with the talk page for the Wikipedia article* talk_revid: Most recent revision ID associated with the talk page for which a WikiProject asssessment was made (might not be current revision ID)* wp_templates: List of WikiProject templates from the page_assessments table.<br>* qid: Wikidata ID corresponding to the Wikipedia article* sitelinks: Based on Wikidata, the other languages in which this article exists and the corresponding page IDs.<br>* topics: topic labels associated with the article based on its WikiProject templates and the WikiProjectLabel mapping (wikiproject_taxonomy)<br><br>This version is based on the 24 May 2020 page_assessment tables and 4 May 2020 Wikidata item_page_link table. Articles with no associated WikiProject templates are not included. Of note in comparison to previous versions of this file, the revision IDs are now that revision IDs that were most recently assessed by a WikiProject, not the current versions of the page. The sitelinks are now as page IDs, which are more stable and less prone to encoding issues etc. The WikiProject templates are now pulled via the Mediawiki page_assessments table and so are in a different format than the templates that were extracted from the raw talk pages.<br><br>For example, here is the line for Agatha Christie from the English JSON file:<code>{</code><code>'title': 'Agatha_Christie',</code><code>'article_revid': 958377791,</code><code> 'talk_pid': 1001,</code><code> 'talk_revid': 958103309,<br> 'wp_templates': [</code><code>"Women",</code><code>"Women's History",</code><code>"Women writers",</code><code>"Biography",</code><code>"Novels/Crime task force",</code><code>"Novels",</code><code>"Biography/science and academia work group",</code><code>"Biography/arts and entertainment work group",</code><code>"Devon",</code><code>"Archaeology/Women in archaeology task force",</code><code>"Archaeology"],</code><code> 'qid': 'Q35064',</code><code> 'sitelinks': {</code><code> 'afwiki': 19274,</code><code></code><code> 'am</code><code><code>wiki</code>': 47582,<br> 'an</code><code><code>wiki</code>': 115127,<br> 'ar</code><code><code>wiki</code>': 12886,<br></code><code> ...</code><code>'enwiki': 984,<br></code><code>...</code><br><code></code><code></code><code> 'zh</code><code><code>wiki</code>': 10983,<br> 'zh_min_nan</code><code><code>wiki</code>': 21828,<br></code><code> 'zh_yue</code><code><code>wiki</code>': 131652}</code><code>}</code>