Page MenuHomePhabricator

Get machine readable information that an item in Wikidata is flagged for deletion
Closed, ResolvedPublic

Description

From David Shorthouse at 24:40 presentation about integrating with Wikidata he is asking for the possibility of getting an alert when one object in Wikidata is flagged for deletion so his community can give that object more care in Wikidata

image.png (1×1 px, 666 KB)

Related Objects

Event Timeline

Thanks @Salgo60. What I'm looking here, specifically, is some mechanism to have tighter interaction between wikidata (SPARQL maybe?) and the activity that takes place on https://www.wikidata.org/wiki/Wikidata:Requests_for_deletions. While of course a user who created the item may receive notification in their wikidata account, the existence of an item mentioned on Requests for Deletion is not discoverable through an API. My work-around is to screen-scrape that page such that I can cross-reference the Q numbers to ones I care about.

I wrote a simple query to find items for deletion which are related to the Czech Republic:
https://w.wiki/4AyX

Maybe you'll find that useful

Oh cool! So, if I understand this correctly, the title of the page mentioned on the Request for deletion is queried. Here's what I would run using the Bionomia ID property, P6944:

SELECT DISTINCT ?item ?itemLabel WHERE {
    SERVICE wikibase:mwapi
    {
      bd:serviceParam wikibase:endpoint "www.wikidata.org".
      bd:serviceParam wikibase:api "Generator".
      bd:serviceParam mwapi:generator "links".
      bd:serviceParam mwapi:titles "Wikidata:Requests for deletions".
      bd:serviceParam mwapi:gpllimit "max".
      bd:serviceParam mwapi:gplnamespace "0".
      ?item wikibase:apiOutputItem mwapi:title.
    }
   
    ?item wdt:P6944 ?id .
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Does this seem correct? Are there any limitations here that I should be aware of (eg perhaps a title used in a request for deletion that would slip through, undetected)?

Oh cool! So, if I understand this correctly, the title of the page mentioned on the Request for deletion is queried. Here's what I would run using the Bionomia ID property, P6944:

SELECT DISTINCT ?item ?itemLabel WHERE {
    SERVICE wikibase:mwapi
    {
      bd:serviceParam wikibase:endpoint "www.wikidata.org".
      bd:serviceParam wikibase:api "Generator".
      bd:serviceParam mwapi:generator "links".
      bd:serviceParam mwapi:titles "Wikidata:Requests for deletions".
      bd:serviceParam mwapi:gpllimit "max".
      bd:serviceParam mwapi:gplnamespace "0".
      ?item wikibase:apiOutputItem mwapi:title.
    }
   
    ?item wdt:P6944 ?id .
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Does this seem correct? Are there any limitations here that I should be aware of (eg perhaps a title used in a request for deletion that would slip through, undetected)?

Yeah, there are limitations. In my query, some items may be false positives (items linked from the proposal page but not because they have been nominated for deletion) and some may have been missed because they are related to Czechia in a different way then I modelled there. Besides that, as far as I know, it should work.

Salgo60 claimed this task.

tweet

image.png (342×1 px, 63 KB)