User:SJK/TODO

Fix Otago Duplication edit

I created 180 items from Maori Wikipedia using Petscan (localities in Otago Region). Some of those I think were duplicates. I also think there were some pre-existing is this category that I didn't create. So now I want to try to fix up the duplicates.

Step 1: Get rid of the ", New Zealand" from following items English label edit

Done

Step 2: Find merge candidates using SPARQL edit


SELECT ?item1Label ?item2 ?item2Class ?item1 ?item1Class
WHERE
{
        ?item1 wdt:P131/wdt:P131* wd:Q692912 .
        ?item2 wdt:P131/wdt:P131* wd:Q692912 .
		FILTER (?item1 != ?item2) .
  		?item1 rdfs:label ?item1Label .
  		FILTER LANGMATCHES(LANG(?item1Label),"EN") .
  		?item2 rdfs:label ?item2Label .
  		FILTER LANGMATCHES(LANG(?item2Label),"EN") .
  		FILTER (STR(?item1Label) = STR(?item2Label)) .
  		BIND(xsd:integer(REPLACE(STR(?item1),"http://www.wikidata.org/entity/Q","")) AS ?id1) .
  		BIND(xsd:integer(REPLACE(STR(?item2),"http://www.wikidata.org/entity/Q","")) AS ?id2) .
		FILTER (?id1 < ?id2) .
  		OPTIONAL { ?item1 wdt:P31 ?item1Class } .
  		OPTIONAL { ?item2 wdt:P31 ?item2Class } 
} ORDER BY ?item1Label

Results are here