Wikidata:Requests for permissions/Bot/PLbot 6
The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
- Approved--Ymblanter (talk) 19:19, 13 May 2014 (UTC)[reply]
PLbot 6[edit]
PLbot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Pasleim (talk • contribs • logs)
Task/s: add instance of (P31) and remove P107 (P107) claims from Chinese administrative divisions
Function details: There are currently 730,000 items with China administrative division code (P442) but without a instance of (P31) claim. In addition, a vast majority of them have a P107 (P107) claim. The bot will add these missing P31 claims and remove the P107 ones. It can also add P132 claims but will wait until consensus is reached at Wikidata:PFD#Typ_der_administrativen_Einheit_.28P132.29.
The P31 value is derived from the following scheme.
length of P442 |
ending characters of zh-cn or zh-hans label |
division | cross-check with P442 |
---|---|---|---|
4 | 市 | prefecture-level city (Q748149) | 3./4. digit = 01-20 or 51-70 |
4 | 地区 | prefecture (Q1045608) | 3./4. digit = 21-50 |
4 | 自治州 | autonomous prefecture (Q788104) | 3./4. digit = 21-50 |
4 | 盟 | league (Q288653) | 3./4. digit = 21-50 |
6 | 自治县 | autonomous county (Q1336099) | 5./6. digit = 21-80 |
6 | 县 or 縣 | county in PRC (Q1289426) | 5./6. digit = 21-80 |
6 | 区 | urban district (china) (Q5034569) | 5./6. digit = 01-18 |
6 | 市 | Q13099274 (?) | 5./6. digit = 01-18 |
6 | 县 or 縣 | Q13099274 | 5./6. digit = 01-18 |
6 | 市 | county-level city (Q1070990) | 5./6. digit = 81-99 |
6 | 旗 | banner (Q806869) | 5./6. digit = 21-80 |
9 | 镇 | town of China (Q735428) | 7./9. digit = 100-199 |
9 | 街道 | subdistrict (Q12808966) | 7./9. digit = 001-099 |
9 | 族乡 | ethnic township (Q582525) | 7./9. digit = 200-399 (?) |
9 | 乡 | township of China (Q1500350) | 7./9. digit = 200-399 |
9 | township-level division similar to townships (Q12809484) | 7./9. digit = 400-599 | |
12 | 村 | village (Q13100073) | 9./12. digit = 200-399 |
12 | 社区 | residential community (Q985488) | 9./12. digit = 001-199 |
9 | 苏木 | sum (Q1761350) (or new item) | 7./9. digit = 200-399 |
9 | 地区 | Area of Beijing (Q10868922) | 7./9. digit = 001-099 |
Note that this is not a complete list of all Chinese administrative division types. All items which do not match in this scheme will not be edited by the bot.
--Pasleim (talk) 12:21, 10 May 2014 (UTC)[reply]
- Better to cross check with contents in P442. Liangent (talk) 15:42, 10 May 2014 (UTC)[reply]
- Ok, I added some cross-checks according to en:Administrative division codes of the People's Republic of China --Pasleim (talk) 09:57, 11 May 2014 (UTC)[reply]
- I expanded the list a little. Liangent (talk) 11:34, 11 May 2014 (UTC)[reply]
- Thanks. I updated my script so the bot will work according to this new list. --Pasleim (talk) 18:20, 11 May 2014 (UTC)[reply]
- Added two more.--GZWDer (talk) 05:32, 13 May 2014 (UTC)[reply]
- Thanks. I updated my script so the bot will work according to this new list. --Pasleim (talk) 18:20, 11 May 2014 (UTC)[reply]
- I expanded the list a little. Liangent (talk) 11:34, 11 May 2014 (UTC)[reply]
- Ok, I added some cross-checks according to en:Administrative division codes of the People's Republic of China --Pasleim (talk) 09:57, 11 May 2014 (UTC)[reply]