Wikipedia:Bots/Requests for approval/LivingBot


 * The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Symbol keep vote.svg Approved.

LivingBot
Operator: Jarry1250

Automatic or Manually Assisted: Unsupervised automatic

Programming Language(s): PHP

Function Summary: Checking "___ missing (living people)" to make sure that they are also marked as Living people.

Edit period(s) (e.g. Continuous, daily, one time run): One time run

Already has a bot flag (Y/N): N/A

Function Details: I imagine the process to be such:
 * 1) Grab listing of articles in the Category:Year of birth missing (living people) or similar category.
 * 2) Scan each one to see if they have Category:Living people (or a template that generates it).
 * 3) If they don't, add them to Category:Living people

Category:Living people is mandatory for all articles about living people, regardless of whether they have Category:Year of birth missing (living people) (etc.) or not. However, some articles in the latter are not in the former, when they should be. A nice, easy task for a bot to do I would think.

Discussion
Okay, so this is my new area for improvement. I realise that my last application was a bit too tricky for a bot to handle, so I've drawn up a completely new proposal. Older discussion is hidden below if anyone wants it. - Jarry1250 (t, c) 19:57, 10 January 2009 (UTC)
 * Actually, the other task wasn't too bad, it just needed a bit of human help.
 * As for this task, are you planning to use the API's prop=categories to detect which categories the page has? Anomie⚔ 20:09, 10 January 2009 (UTC)
 * Yeah, it did just need human effort. I did what I could but unfortunately I didn't really have the time. Still, 57 pages corrected wasn't that bad an effort. I'll have to look into prop=categories, I didn't even know it existed. - Jarry1250 (t, c) 20:21, 10 January 2009 (UTC)
 * See api.php for a quick reference to all the API can do, and API for something a bit more human-readable. Anomie⚔ 20:25, 10 January 2009 (UTC)
 * Yes, I'll definitely use the above, assuming it registers template generated categories. - Jarry1250 (t, c) 20:37, 10 January 2009 (UTC)

Have you considered using the m:Toolserver? A simple query told me that 1055 out of 37385 pages in Category:Year of birth missing (living people) are not in Category:Living people. I listed those at ~erwin85/dbq/enwiki livingbot.txt. --Erwin(85) 21:20, 10 January 2009 (UTC)
 * I assume you meant ~erwin85/dbq/enwiki livingbot.txt. No that's just me being a bit grumpy because I just spent ages drawing up my own list like that and now feel like a complete idiot. ;) You live to learn these things, i suppose. Right, now all I need is permission to have my bot run through and edit them all. - Jarry1250 (t, c) 21:54, 10 January 2009 (UTC)
 * Indeed. Removed the typo. --Erwin(85) 22:33, 10 January 2009 (UTC)

Sounds like a great idea. Simple, but important. Debresser (talk) 00:39, 11 January 2009 (UTC)
 * The code's all in place now, so I'm ready for a trial should one be authorised. - Jarry1250 (t, c) 12:34, 11 January 2009 (UTC)
 * Yes, the task looks straightforward. Anomie⚔ 14:55, 11 January 2009 (UTC)
 * - you can see the 25 edits it made (all correct I think), on its contributions page. - Jarry1250 (t, c) 15:29, 11 January 2009 (UTC)

Looks good, although you might want to consider copying the sortkey from the Category:Year of birth missing (living people) (if any) unless DEFAULTSORT is present on the page. Anomie⚔ 01:27, 12 January 2009 (UTC)


 * The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.

<!--

Older discussion
Will it check the sources? What would keep a vandal from adding them to the "Hey this person died" category and this coming along and nuking it from the "Hey I'm actually still alive" category? Q T C 16:55, 5 January 2009 (UTC)
 * I've given this some thought. Firstly, one must admit that the chances of a vandal adding a page to 2009 deaths (or whatever) when they haven't died and this going unnoticed until the bot comes across the page are slim. Assuming that there is a chance of this happening, the bot could try and cross reference the information with other sources of death information e.g. an infobox. A talk page message might help as well, notifying of the change and providing instructions if it is in error. Still, it wouldn't be much work to revert anyway. Of course, avoiding harm should be a priority. LivingBot (talk) 17:04, 5 January 2009 (UTC)
 * You'll definitely want to have some sort of check. The chance of any given article having an inaccurate death category is indeed low, but the chance of some articles having it is a virtual certainty.  Looking in the infobox is definitely worth while and it wouldn't hurt to check the text as well; the text is the most likely to be accurate, but not as easy for a bot to properly read. --ThaddeusB (talk) 17:21, 5 January 2009 (UTC)
 * Okay. I'll definitely make it read the infobox and I'll try to make it check the text as well. I'm happy to make these conditions of any trial for the bot. LivingBot (talk) 17:31, 5 January 2009 (UTC)

Please note that, per the Bot policy, you should be using your own account and not the bot account for any edits that are not for an approved task, which includes editing this page or the bot's user page.

Do you intend to publish the bot's source code for public review? Anomie⚔ 17:43, 5 January 2009 (UTC)
 * Oops, sorry. It won't happen again. I've not created any bots before; when should I be releasing the code? I have written it yet, but I'm not going to keep it a secret when I do, certainly. Jarry1250 (talk) 17:49, 5 January 2009 (UTC)
 * No problem re the edits using the bot account, just letting you know. Regarding the source code, it's not required that the source be published at all, just encouraged. But publishing it can help the approval process, and it might get you some free bug fixes, optimization, or other coding advice.
 * BTW, an easy way to publish the source (and get a little experience using the API) is to have the bot upload the source to its userspace on startup; you can do this without a BRFA, as the bot policy states that a bot that only edits the operator's userspace (and the bot's userspace is considered your own) and is not otherwise disruptive does not require prior approval. Just be sure the bot account password and other sensitive information is in a file that isn't automatically uploaded! ;) Anomie⚔ 18:10, 5 January 2009 (UTC)
 * I've just edited the function summary and details a bit to fit with my present understanding of how to go about this. On a purely read and log basis, the criteria are good but still need more improvement. Last run was test of 500 articles; one match found; human check by me found that they were actually deceased i.e. the bot worked. Criteria continually tweaked, of course. Jarry1250 (talk) 21:03, 6 January 2009 (UTC)

I would suggest that this bot might be nearly as helpful if it simply ran and gathered a list of articles to check out, rather than doing the editing itself. First, if 1 in 500 living person articles passes the test, it sounds like a human-approachable task to go through the list of positive results. Second, since this seems to be based on on-Wiki information, it should always be checked by a human. Finally, if the person is really dead, there is likely more editing that needs to be done, such as updating infoboxes or text, or finding a source for the death, which again a human should do. Even if the bot does remove the category automatically, it would probably be good if it posted a list of hits for humans to go through. Mango juice talk 17:10, 7 January 2009 (UTC)


 * It'll certainly post a list of hits for further investigation. But the numbers do add up. 1 in 500 = 0.2%; 0.2% * 300000 = 600 articles, a fair chunk of work. Considering time is of the essences, what with all the other bots using this to make other judgements, I just thought it would be quicker. Still, I'll run it in "Log only" mode for now, and we'll see what results we get. Jarry1250 (talk) 17:19, 7 January 2009 (UTC)
 * Well, it seems there are probably fewer problem articles than I feared - or I've miscoded the bot. Would someone mind having a look at the code for me? It's at User:LivingBot. Cheers! Jarry1250 (talk) 20:50, 8 January 2009 (UTC)

-->