Wikipedia:Bots/Requests for approval/BracketBot
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Approved.
Operator: A930913 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 04:30, Thursday March 28, 2013 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python
Source code available: Available on request, until such time as I get around to putting it up somewhere.
Function overview: It checks if all edits to see if all open brackets ({[< have matching close brackets >]}) and informs editors that their edit may have broken some markup if there is a mismatch.
Links to relevant discussions (where appropriate):
Edit period(s): Continuous
Estimated number of pages affected: ~10/hour
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No):
Function details: It checks if all edits to see if all open brackets ({[< have matching close brackets >]}) and informs editors that their edit may have broken some markup if there is a mismatch. In order to reduce false positives, it will not message the editor if one of these conditions are met:
- It is not in the main namespace.
- It is fixed within five minutes.
- There are no unmatched brackets for the whole article.
- It finds the unorthodox numbering system of 1), 2)...
- The edit is a revert (containing "rv" or "revert" in the edit summary.)
Currently, the live feed can be viewed at ##930913 connect and more specifically at ##930913-ub connect. If it is not running, ping a930913.
At the moment, the script is only for detection, however when I make the editing side of the script, I will make it honour exclusions and have opt-outs similar to SineBot
I will also make a template for the bot to use. This should be part of the discussion.
Discussion
editCurrent template: {{User:BracketBot/inform}}
Example:
Hello, I'm BracketBot. I have automatically detected that your edit to Thompson, Ventulett, Stainback & Associates may have broken the syntax by modifying 1 "[]"s and 1 "{}"s likely mistaking one for another. If you have, don't worry: just edit the page again to fix it. If I misunderstood what happened, or if you have any questions, you can leave a message on </noinclude>:REVISIONUSER}}§ion=new my operator's talk page. {{subst:#if:|{{subst:#ifexpr:100>2|
List of unpaired brackets remaining on the page(Click show ⇨)
|
---|
|
Oops, something went wrong. Please tell me. {{subst:#ifexpr:100>2| |
|}}|}} It's OK to remove this message. Also, to stop receiving these messages, follow these opt-out instructions. Thanks, ~~~~
930913(Congratulate) 05:17, 28 March 2013 (UTC)[reply]
- Question: If it is a revert, not all reverts will have "rv" or "revert" written in them. If I'm not mistaken, the logs record rollbacked edits and undone edits. Wouldn't be more sensible to read that along with "revert", "rv", and "undo"? — Preceding unsigned comment added by Cyberpower678 (talk • contribs) 13:18, 29 March 2013 (UTC)[reply]
- I can find no existence of such a log. Even were there one, I would imagine that the hard coded rollbacks and undos are used less often than their software equivalents. To my knowledge, this is the standard when it comes to detecting reverts. 930913(Congratulate) 20:17, 30 March 2013 (UTC)[reply]
- Use revision hashes? - Jarry1250 [Vacation needed] 21:30, 2 April 2013 (UTC)[reply]
- That would increase the load on either the bot or wikipedia by a big factor. 930913(Congratulate) 20:53, 3 April 2013 (UTC)[reply]
- Er, how so? The revision hash is supplied neatly via the API, you can get five in one request (potentially the same request you're already making). Even getting that five would vastly improve the revert detection rate at a performance cost of essentially zero. - Jarry1250 [Vacation needed] 22:25, 4 April 2013 (UTC)[reply]
- Ah, the API has changed a lot since I last used it. Done 930913(Congratulate) 23:27, 13 April 2013 (UTC)[reply]
- Er, how so? The revision hash is supplied neatly via the API, you can get five in one request (potentially the same request you're already making). Even getting that five would vastly improve the revert detection rate at a performance cost of essentially zero. - Jarry1250 [Vacation needed] 22:25, 4 April 2013 (UTC)[reply]
- That would increase the load on either the bot or wikipedia by a big factor. 930913(Congratulate) 20:53, 3 April 2013 (UTC)[reply]
- Use revision hashes? - Jarry1250 [Vacation needed] 21:30, 2 April 2013 (UTC)[reply]
- I can find no existence of such a log. Even were there one, I would imagine that the hard coded rollbacks and undos are used less often than their software equivalents. To my knowledge, this is the standard when it comes to detecting reverts. 930913(Congratulate) 20:17, 30 March 2013 (UTC)[reply]
- The bot name does not comply with WP:BOTACC. It identifies neither the operator, nor the task it performs. And I would further argue simply "bot" is ambiguous, as we have many bots. — HELLKNOWZ ▎TALK 20:21, 30 March 2013 (UTC)[reply]
- With four brackets in the name, it identifies that the bot ought to have some affiliation to them, in this case matching them. The name demonstrates this succinctly while clearly denoting the account operates automatically. To the casual editor, the most striking thing is bot, and is near impossible to confuse with a human. To the wikipedian, the most striking thing are the brackets, which suggests at the very least some form of wiki markup and at the minimal investigation, the full nature of the task. In both cases, the important part is the most striking. 930913(Congratulate) 20:40, 30 March 2013 (UTC)[reply]
- I don't know; your points are well taken, but I think I agree with Hellknowz on this one. Even to a Wikipedian and/or someone familiar with the task, the parentheses are going to just look like decoration as much if not more than they'll suggest some form of wiki markup. — madman 23:49, 31 March 2013 (UTC)[reply]
- Would something such as SyntaxBot, or MarkupBot, maybe BracketBot not be more appropriate? ·Add§hore· Talk To Me! 13:09, 1 April 2013 (UTC)[reply]
- I'm not going to deny BracketBot is more appropriate. It's just that I (and the consensus when discussed on IRC) like the beauty of the succinctness of the name ((Bot)). BracketBot works 100%, but ((Bot)) still gets 80%, which is enough I'm hoping to let you pass, for science. 930913(Congratulate) 21:08, 2 April 2013 (UTC)[reply]
- I have to say, my initial impression was to ask for a name change as well. - Jarry1250 [Vacation needed] 21:30, 2 April 2013 (UTC)[reply]
- I'm not going to deny BracketBot is more appropriate. It's just that I (and the consensus when discussed on IRC) like the beauty of the succinctness of the name ((Bot)). BracketBot works 100%, but ((Bot)) still gets 80%, which is enough I'm hoping to let you pass, for science. 930913(Congratulate) 21:08, 2 April 2013 (UTC)[reply]
- Would something such as SyntaxBot, or MarkupBot, maybe BracketBot not be more appropriate? ·Add§hore· Talk To Me! 13:09, 1 April 2013 (UTC)[reply]
- I don't know; your points are well taken, but I think I agree with Hellknowz on this one. Even to a Wikipedian and/or someone familiar with the task, the parentheses are going to just look like decoration as much if not more than they'll suggest some form of wiki markup. — madman 23:49, 31 March 2013 (UTC)[reply]
- With four brackets in the name, it identifies that the bot ought to have some affiliation to them, in this case matching them. The name demonstrates this succinctly while clearly denoting the account operates automatically. To the casual editor, the most striking thing is bot, and is near impossible to confuse with a human. To the wikipedian, the most striking thing are the brackets, which suggests at the very least some form of wiki markup and at the minimal investigation, the full nature of the task. In both cases, the important part is the most striking. 930913(Congratulate) 20:40, 30 March 2013 (UTC)[reply]
I don't have a problem with having some leeway to the bot policy on naming, which is sometimes a bit stricter than what we use in practice (e.g. EdwardsBot does not "identify the operator or bot function", but is still an acceptable name). However, the purpose of the policy, is to stop names that are going to cause confusion. It is important to remember that new users are easily confused by bots. Considering new users are the most likely people to have trouble using brackets, and thus most likely to interact with the bot, it is especially important that we do not add to their confusion. Reading the warning template above, any user could be forgiven for not realising that "((Bot))" is the name of the bot (in fact, many new users, would be unfamiliar with the word bot). The confusion far outweighs any beauty and succinctness of the name.
Apart from that, there should probably be a limit on how many times the bot will message a user. --Chris 11:43, 3 April 2013 (UTC)[reply]
- Certainly worthy of a discussion. Do you mean limiting the bot to only messaging a user x times ever, or limiting to x times per y time? 930913(Congratulate) 20:53, 3 April 2013 (UTC)[reply]
- I'd say x times ever. Hazard-SJ ✈ 23:26, 13 April 2013 (UTC)[reply]
- Clearly the suggested name of ((Bot)) does not sit well. Motion passed to change name to BracketBot. 930913(Congratulate) 20:53, 3 April 2013 (UTC)[reply]
- Done
FYI... Check Wikipedia already checks for missing [] {} brackets. Specifically, errors #10 and #46 checks []. Errors #43 and #47 checks {}. If you click on the error links, there are few articles with errors. This is misleading as the daily run of the program does not catch them all. Checkwiki is run every month against latest dump file and find roughly 1,000 new articles for each error. AWB handles ~80% of the cases for #10, #43, #46. AWB does not handle #47. Around ~15% of the cases for #47 is a result of vandalism.
Also, there are alot of math articles that would create false positives. Unbalanced brackets may or may not be contained in math tags. There are also alot of cases of a stray bracket(s). For example: {{cite web | url=example.com?id=e8fj} | title=example}} or {{cite web | url=example.com?id=e8fj | title=example}}}} The stray bracket(s) could be anywhere in the cite template. Bgwhite (talk) 07:32, 7 April 2013 (UTC)[reply]
- Those stray brackets are wrong and break the template syntax. Why should the bot not inform the user that they have done that?
- Math articles do create false positives, though it should be possible to eliminate most of them. Failing that, it will be possible to exclude the bot from the page or the user. 930913(Congratulate) 23:27, 13 April 2013 (UTC)[reply]
I think the template wording could be less obscure, why not just say that the syntax is broken by having unmatched brackets?
- Hello, I'm BracketBot. I have detected that your edit to Thompson, Ventulett, Stainback & Associates may have broken the syntax by including unmatched brackets (pairing one type with a different type). If I misunderstood what happened, or if you have any questions, you can leave my operator a message on his talk page. Thanks, Bot.
I don't think my wording is quite up to snuff, either, but I think it can be stated more simply. -68.107.137.178 (talk) 19:00, 15 April 2013 (UTC)[reply]
Any suggestion? ·Add§hore· Talk To Me! 19:03, 15 April 2013 (UTC)[reply]- I am sure if anyone else has any further ideas it can be tweaked once operational and more people see it. ·Add§hore· Talk To Me! 00:17, 16 April 2013 (UTC)[reply]
- Approved for trial (20 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. ·Add§hore· Talk To Me! 09:51, 16 April 2013 (UTC)[reply]
- Trial complete. 930913(Congratulate) 00:14, 17 April 2013 (UTC)[reply]
Trial Results
editAbout seven out of the twenty notified have since fixed their edits (as of this post), likely[1][2][3][4] as a direct consequence of being notified. More have been fixed by other means.
Editors have said thanks[4], and even given kitties[5].
So far the response has only been positive. I think this bot shows a clear benefit to wikipedia. 930913(Congratulate) 00:52, 17 April 2013 (UTC)[reply]
- I noticed that the bot created a few users' talk pages. Can the bot add a
{{subst:welcome}}
before the message in those cases, like how MadmanBot does? Legoktm (talk) 01:00, 17 April 2013 (UTC)[reply]
- Seems desirable. Done 930913(Congratulate) 01:06, 17 April 2013 (UTC)[reply]
- Approved for extended trial (100 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. which should include the added change of adding some sort of welcome when creating new pages. ·Add§hore· Talk To Me! 22:54, 17 April 2013 (UTC)[reply]
{{BotTrialComplete}}
Still an untested bug fix floating in there, can I have some more edits just to ensure I've caught the blighter? 930913(Congratulate) 23:36, 22 April 2013 (UTC)[reply]- Approved for extended trial (100 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. MBisanz talk 02:16, 23 April 2013 (UTC)[reply]
- Trial complete. 930913(Congratulate) 18:31, 5 May 2013 (UTC)[reply]
- Seems desirable. Done 930913(Congratulate) 01:06, 17 April 2013 (UTC)[reply]
Extended Trial Results
editI think the bot should simply make a clean edit to the user talk page, add the welcome, good idea, and the bot's notice, but this edit is confusing, as I cannot really see what BracketBot added, it should dd to the bottom, not insert a filling in the sandwhich, imo. The notice is not too bad, still I wish it were clearer. -68.107.137.178 (talk) 16:38, 21 April 2013 (UTC)[reply]
- Correct. This was a bug, this is not the intended behaviour. I think I have tracked it down and fixed it. Thank you for raising this issue; please raise it again if you see it again. 930913(Congratulate) 16:53, 21 April 2013 (UTC)[reply]
- Soinds good. I only ran through a few edits and stopped with confusion at this one, so try to run through a good number. -166.137.210.27 (talk) 19:25, 21 April 2013 (UTC)[reply]
A couple of questions.
- A930913 and I have talked about this... I got a message from the bot about an unbalanced bracket, but I did not edit anywhere near where the bracket was located. I can see the value of a non-offending party receiving a message from the bot, however this will cause some downright evil comments from editors. If the bot is approved, I'd want A930913 to have explicit permission to do this. Hopefully that will stave of some of the evil comments and help A930913 to cover his butt.
- I see the bot ignores 1), does it also ignore a) and A)?
- What about tables? Does it catch a case where there is a {|, but no |}? I hope it doesn't
Bgwhite (talk) 21:34, 23 April 2013 (UTC)[reply]
- Hi Bgwhite, that is what A930913 is here for, to get explicit permission from you and BAG and the rest of the Wikipedia thecommunity to run this bot. I think that your feedback will be very helpful in getting this bot running correctly, so I hope you continue to monitor the bot.
- A930913, will you post when you have figured out what went wrong? Your message does appear to be okay, although it appears that you posted the wrong type and number of brackets? -68.107.137.178 (talk) 01:19, 24 April 2013 (UTC)[reply]
- Yes, thank you for your comments, they are appreciated. I might suggest A930913 leave a link on WP:VPR to get wider notice. MBisanz talk 23:19, 24 April 2013 (UTC)[reply]
- Thank you for this.
- It doesn't at the moment, because I have never seen this cause an error. If it becomes a problem, I'll add it.
- At the moment, it would. I don't see why it shouldn't.
- Nothing went wrong as such. The bot saw he changed the brackets, calculated that they were imbalanced (within the diff context), calculated five minutes later that there were unmatched brackets left on the page and duly noted Bgwhite. The problem lies in that the bot doesn't know what is wrong with a page, just that something is likely to be wrong. Take "Foo [[bar baz". The bot can tell something is wrong, but it doesn't know whether it should be "Foo bar baz" or "Foo [[bar]] baz" or even "Foo [[bar baz]]" Other types of edits can make it even more complex. The closing brackets could be anywhere in the page. The bot works on the diff and the full page, but it cannot determine what parts are relevant. It therefore must assume that if both the diff and the page contain mistakes, it should notify.
- I will notify the wider community as MBisanz suggested. 930913(Congratulate) 11:50, 30 April 2013 (UTC)[reply]
- It would be more useful to state exactly what is wrong by the incorrect mismatch on brackets, but it it is still useful, in my opinion, as run, just notifying editors that there is a problem. -68.107.137.178 (talk) 09:00, 5 May 2013 (UTC)[reply]
- ^ http://en.wikipedia.org/w/index.php?title=Enchant_(band)&diff=next&oldid=550689018
- ^ http://en.wikipedia.org/w/index.php?title=Frequency_Unknown&diff=next&oldid=550694404
- ^ http://en.wikipedia.org/w/index.php?title=Mikel_Cee_Karlsson&diff=next&oldid=550724919
- ^ a b http://en.wikipedia.org/w/index.php?title=User_talk:Bejnar&diff=550674847&oldid=550674055
- ^ http://en.wikipedia.org/w/index.php?title=User_talk:A930913&diff=next&oldid=550684721
- Approved. MBisanz talk 22:36, 6 May 2013 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.