Wikidata:Requests for permissions/Bot/AmpersandBot
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) 20:49, 3 July 2016 (UTC)[reply]
AmpersandBot[edit]
AmpersandBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: PinkAmpersand (talk • contribs • logs)
Task/s:
- Add descriptions based on P17, P31, and P131 values
- Add labels based on automated romanizations
Code: Pywikibot. Script viewable on GitHub
Function details: This is a bot that sets descriptions for items based on their instance of (P31) values. I'm not a particularly experienced coder, so I want to start with something real simple: My bot will be going through items that contain the statement instance of (P31)village of Ukraine (Q21672098), picking out the ones that don't have an English description already, and setting the English description as "Ukrainian village". I have more complicated tasks in mind for this bot in the future, but I figure this is a nice way to dip my toes in the water.
— PinkAmpers&(Je vous invite à me parler) 01:39, 28 June 2016 (UTC)[reply]
- Scratch that, I'll be using more detailed statements where possible. — PinkAmpers&(Je vous invite à me parler) 18:30, 28 June 2016 (UTC)[reply]
- Test run here. Disregard these two edits in the middle ([1], [2]), which were manual tests made while trying to fix a bug. — PinkAmpers&(Je vous invite à me parler) 02:07, 29 June 2016 (UTC)[reply]
- This looks fine to me. Some of the items your bot is editing also have no English label value, in addition to no description - have you considered adding the label as well (if there is a standard English form for the village names?) ArthurPSmith (talk) 13:10, 29 June 2016 (UTC)[reply]
- @ArthurPSmith: I did consider that, but wasn't sure how I ought to go about doing it. Would it be acceptable for me to just automatically romanize the Ukrainian name? It seems the Ukrainian National system of romanization would be suitable. — PinkAmpers&(Je vous invite à me parler) 17:45, 29 June 2016 (UTC)[reply]
- @ArthurPSmith: Look good? — PinkAmpers&(Je vous invite à me parler) 18:28, 29 June 2016 (UTC)[reply]
- Probably ok - if you could run a handful of test edits again (maybe on some items that you've run before to update just the labels?) that would be a good check! ArthurPSmith (talk) 20:22, 29 June 2016 (UTC)[reply]
- @ArthurPSmith: Well, I ran into an interesting problem during the test run, which was that I quickly started hitting dupe errors, e.g. trying to set a label as "Ivanivka" when the description is simply "village in Ukraine" and there's already another item with those properties. But that got me thinking, there's really no reason an item should have a description like that when a more precise one can be given. So I changed the code to not only add descriptions where none exist, but also to change them where the description is something generic like "village in Ukraine", "administrative territorial entity of Ukraine", etc. In the rare case where I get a dupe error nonetheless, I have the code set to log that, for me to review later on (example) After a lot of mini-test-runs to get the code just right, I think I've got it now. See test run here and code changes here. I'm pretty sure that this actually doesn't include any items from the initial test run, but that's just because with the new parameters the bot's now working in much lower Q#s for now. — PinkAmpers&(Je vous invite à me parler) 23:23, 1 July 2016 (UTC)[reply]
- Probably ok - if you could run a handful of test edits again (maybe on some items that you've run before to update just the labels?) that would be a good check! ArthurPSmith (talk) 20:22, 29 June 2016 (UTC)[reply]
- This looks fine to me. Some of the items your bot is editing also have no English label value, in addition to no description - have you considered adding the label as well (if there is a standard English form for the village names?) ArthurPSmith (talk) 13:10, 29 June 2016 (UTC)[reply]
- Comment The edit summary doesn't seem particularly helpful. It currently reads "Updated item: set description based on P31 (TEST RUN; block if malfunctioning)". Could you use standard edit summaries, e.g. "added [en] description: village in Mostyska Raion, Lviv Oblast, Ukraine", and append "based on P31/P17/P131"?
--- Jura 16:31, 29 June 2016 (UTC)[reply]- @Jura1: Good point. Done. — PinkAmpers&(Je vous invite à me parler) 17:33, 29 June 2016 (UTC)[reply]