Wikipedia:Bots/Requests for approval/Lightbot 10


 * 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 Symbol oppose vote.svg Withdrawn by operator.

Lightbot 10
Operator:

Automatic or Manually assisted: Automatic supervised

Programming language(s): AWB, monobook, vector, manual

Source code available: Source code for monobook or vector are available. Source code for AWB will vary but versions are often also kept as user pages.

Function overview: Janitorial edits to units

Links to relevant discussions (where appropriate): This request duplicates the 'units of measure' section of Bots/Requests for approval/Lightbot 3. That BRFA was very similar to the two previous approvals: Bots/Requests for approval/Lightbot and Bots/Requests for approval/Lightbot 2.

Edit period(s): Multiple runs. Often by batch based on preprocessed list of selected target articles.

Estimated number of pages affected: Individual runs of tens, or hundreds, or thousands.

Exclusion compliant (Y/N): Yes, will comply with 'nobots'

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

Function details: Edits will add conversions to the following metric or non-metric units: inch, foot, mile, mm, cm, m, km, plus their squares and cubes.

Discussion
So if the bot comes across "38 kilometres long", it will add "{&#123;convert|38|km|mi}} long" or something similar, correct? &mdash;  MJC detroit  (yak) 04:18, 19 February 2011 (UTC)

An example of a Lightbot edit shows that it changed: As many people know, my primary focus is on improving accessibility for metric readers with a secondary focus on non-metric readers. Thus the editing scope includes all units. The example of "38 kilometres long", as in Altafjord, is theoretically in scope but is unlikely to be touched. I leave that to editors such as yourself who focus on non-metric units. You and I have cooperated and shared code in the past and I think our work is compatible. I hope that helps. Lightmouse (talk) 18:05, 19 February 2011 (UTC)
 * "25 miles long" to "{&#123;convert|25|mi|km}} long"
 * I try to convert for everyone when I encounter something. I'd like to see the AWB code if you could post it somewhere.  BAG folks: I don't have any objection to this bot.  &mdash;  MJC detroit  (yak) 22:51, 20 February 2011 (UTC)

BAG assistance needed

To move this BRFA forward, per WP:BOTPOL ("performs only tasks for which there is consensus"; "carefully adheres to relevant policies and guidelines"), please provide link(s) to the relevant policy/guideline/consensus that this task should be both performed and performed by an automated bot. The three BRFAs linked do not provide such links. Thank you. — HELL KNOWZ  ▎TALK 13:48, 3 March 2011 (UTC)


 * A relevant guideline is at:
 * mosnum - Unit symbols "Where English-speaking countries use different units for the same measurement, follow the "primary" unit with a conversion in parentheses."
 * The guideline is stable and has existed in various forms for a long time. The three previous successful approvals (Bots/Requests_for_approval/Lightbot_2, Bots/Requests_for_approval/Lightbot_3, Bots/Requests_for_approval/Lightbot_4) have successfully done many thousands of edits along these lines. There is also the recent approval (Bots/Requests_for_approval/Lightbot_5) that converts feet but not inches, this request merely seeks to add inches to the scope. Other editors and I have done many edits along these lines over a long period. I'm sure I could find examples of inch conversions in contributions list but it would be easier just to demonstrate with new edits.
 * Please can we move to a 50 edit trial? Lightmouse (talk) 17:59, 13 March 2011 (UTC)


 * I support approving this under the arbcom restriction that allows a "single task", since this merely expands the single, already approved, task very slightly. Gigs (talk) 23:23, 5 April 2011 (UTC)
 * OK, how about a 20 edit trial then? Lightmouse (talk) 17:39, 13 April 2011 (UTC)

Task is a suitable expansion of Lightbot 5. Note that a successful trial will not necessarily result in however, since I still have some reading to do with the ARBCOM mess, and I'm also wondering if Lightbot 5 should have been approved at all... But let's trial it for now. Headbomb {talk / contribs / physics / books} 15:34, 4 May 2011 (UTC)


 * Thanks. Acknowledging this now but it may be a few days before I run the trial. Lightmouse (talk) 16:21, 4 May 2011 (UTC)

Lightmouse (talk) 23:30, 5 May 2011 (UTC)

Links to trial result? Headbomb {talk / contribs / physics / books} 09:16, 10 May 2011 (UTC)


 * Yes. See [ Trial edits]. Edit summary is 'L10. inch, foot, mile, mm, cm, m, km, plus their squares and cubes' Lightmouse (talk) 09:28, 10 May 2011 (UTC)


 * Inches should be converted to cm, not mm. Headbomb {talk / contribs / physics / books} 19:43, 20 May 2011 (UTC)


 * That is a very easy rule to implement although it isn't mentioned in wp:mosnum. Is it for all articles or just sword articles? Lightmouse (talk) 20:50, 20 May 2011 (UTC)


 * Usually one tries converts to the units closest to the original units. Kilometre/mile, metre/foot, inch/cm, etc... Some discretion is of course involved (yard to meter conversion is usually fine, but meter to yard usually isn't), but it's a good guideline in most cases. Headbomb {talk / contribs / physics / books} 04:30, 21 May 2011 (UTC)


 * The 'nearest-unit' rule means mm would never be used. With a difficult binary choice we need to be right more than 51% of the time. Where the choice was 'wrong' for the individual conversion, the reader is still much better off than without any conversion present. Amendment is much easier than making the initial conversion: you only need to change one or two characters. The convert template defaults to mm and I made the same judgement call, but if you want cm then I'll make it so. Lightmouse (talk) 11:02, 21 May 2011 (UTC)
 * Yes well, it's pretty rare that someone converts from inch to mm in the world too. No idea why the templates automatically convert to mm, but that should probably be tweaked. Headbomb {talk / contribs / physics / books} 13:09, 21 May 2011 (UTC)
 * Headbomb, this appears to assume that people silently convert SI into imperial and back into SI. Sure, inches and cm are around the size of human fingernails, but the ISO won't even recognise cm as a legitimate unit (× 1,000 for each gradation, they say). I see no reason to be swaying towards cm by default. Tony   (talk)  08:00, 22 May 2011 (UTC)
 * Tony, I agree with you that the general rule "Inches should be converted into cm, not mm" is not true. However, your statement that cm is not an SI unit is not correct either, as centi is a SI_prefix. It is a matter of choice whether to use cm or mm, both are correct. However, I agree with your argument that gradation of 1'000 is preferable and therefore personally I would also use mm or m and not cm. I would definitely convert fractional inches (< 1 inch) to mm, larger distances (> 100 inch) into meters. Kehrli (talk) 10:43, 22 May 2011 (UTC)
 * In technical documentation, measures (from a few mm up to a few metres) are usually in mm. In daily usage among people, cm or m are much more common. How to resolve this discrepancy here? A room's ceiling would be at 2400 mm in a building plan and at 2.40 m in a classified ad. A bolt would be 40 mm long the factory, but 4 cm in the shop. &minus;Woodstone (talk) 15:25, 22 May 2011 (UTC)
 * (Just come here following a notice at WP:MOSNUM.) Agree with Headbomb. In the real world centimetres are far more common than millimetres except in e.g. technical measurements. Also, I had no idea that ISO had deprecated centi-, and even if they did, the French cun^H^H^Hgentlemen also want e.g. a space before a per cent sign or kibibyte for 1024 bytes, and we (rightly) don't give a damn about that. ― A. di M.​plé​dréachtaí 17:00, 22 May 2011 (UTC)
 * Also, the template by default rounds the conversion of a whole number of inches to the nearest centimetre (and rightly so, IMO), so expressing the conversion in millimetres means there's be a non-significant potentially misleading zero at the end, as in 12 in where the exact value is 304.8 mm. ― A. di M.​plé​dréachtaí 17:21, 22 May 2011 (UTC)
 * (Also come here following a MOSNUM notice) In technical usage, millimetres should be preferred. In Australia, there is a rule in the building trades that centimetres are not to be used. I can't vouch for other countries, so this appears to be a case where it is best to follow the sources. Michael Glass (talk) 00:16, 23 May 2011 (UTC)
 * But this is about what conversion to use when the source unit is the inch. (Anyway, the bot is just using the template's default, which for a non-intelligent being is probably the best thing to do. Discussions about whether the default should be millimetres or centimetres belong to Template talk:Convert, don't they?) ― A. di M.​plé​dréachtaí 10:22, 23 May 2011 (UTC)
 * The most recent one I can find is Template talk:Convert/Archive January 2010. ― A. di M.​plé​dréachtaí 10:34, 23 May 2011 (UTC)

(coming to this late) Guys, centimeters are certainly an SI unit. This is more than just a matter of style. But I agree with A. di M. that centimeters are generally more common.

However, the practice varies greatly by discipline. In technical matters, an iPhone, for instance, its dimensions would be given in inches and millimeters. I’m not so sure I can offer a simple solution. But an important consideration here is to ensure a conversion does not introduce the false precision that would be typically be introduced if inches were converted to millimeters. So for values that are more than one inch, conversion should be in centimeters.

I would further suggest that if it is possible, values less than one inch have conversions in millimeters. If the inch measurements are fractions, then to the nearest whole millimeter, e.g. $3/8$ inch (10 mm). And if they are decimal inches, then to one decimal place less precision, e.g. 0.354 inch (9.0 mm). It is important to not be careless with precision so as to make a false statement. If an image sensor is said to be 0.354 inches wide, then to convert to three places of precision would result in 8.99 mm, which would in many cases be incorrect since the image sensor was likely metric in the first place at precisely 9 millimeters.

I would also suggest that consideration be made to converting decimal inches that are less than ten inches and are given to three places of precision or more that the conversion be to millimeters with an equivalent number of significant digits, e.g. (The original iPod was 4.02 inches tall (102 mm). This is a real-world example.

Sorry to be a pain and a stickler on this, but if we are going to have bots wading through thousands of articles, I am convinced the above will ensure that A) false precision (errors) are not introduced and B) information is presented most naturally. Greg L (talk) 14:00, 23 May 2011 (UTC)


 * In most cases, the metric community reads, writes, and speaks as if mm and cm are interchangeable. For example, kitchen units are sometimes described as '600 mm' and as '60 cm', in the same text and by the same speaker within minutes. Metric people don't think in inches and you can see in two clicks that there is no '25 mm' boundary between cm and mm in the metric world. No problems with the precision issue that applies to all units, it's covered and can be discussed in detail at the template talk page, your good points are all well-known to all template users and we'd be happy to debate it in detail there. I think this bot can do better than tossing a coin by using the following working guidelines:
 * mm up to 100 mm, fractional inches, rainfall, architecture, cameras, engineering and technical specifications, cars, trains, aircraft, modern ammunition and weapons, and instances where the article already contains mm
 * cm for all other instances

This will require extra effort for coding, list management (e.g. use categories to get lists of target articles), and human oversight. I hope that's acceptable to allow us to start work. Lightmouse (talk) 15:50, 23 May 2011 (UTC)
 * Without appearing to be burdensome, it would be interesting for those who operate auto-thingies and those who care about mm/cm to know your detailed thinking on this if BAG says yes to your starting work. Could you post a thread on your talk page before or during so others can benefit from knowing how to approach this? It would also be good for us to get a documentary grip on who/how/where cm and mm are an issue for editors in various fields. I regard trials and auto-running as a learning experience that should be made easily accessible to increase the community's skills and knowledge in this area. Tony   (talk)  16:56, 23 May 2011 (UTC)
 * It is clear that Lightmouse is very familiar with many conversion intricacies—more than I was prepared to address here and more than I realized (optics came to mind but not munitions). I would say that about the only “attitude” that needs to be maintained heading into this conversion endeavor with a bot is a willingness to initially—if that’s what it takes—to limit conversions to those circumstances where there will be a low possibility of errors such as false precision or unsuitable units (centimeters when measuring the size of artillery shells instead of the proper millimeters). The bot could start out with less sophisticated logic that limits itself to a narrow set of cases. With increasing sophistication to its ruleset and booleans, it can be tasked with a broader scope. The only other “attitude” that bot operators must embrace is that it is often not possible to obtain perfect, cross-project uniformity; most-reliable RSs in certain fields like theater-area tactical missiles in naval settings might refer to …and the U.S. Navy stated that since the Nowang missile has a range of 3500 nm, it could threaten Hawaii. This use of “nm” like this would be an abomination unto the eyes of the SI gods. That is just an example of the broad principal of exceptions to a rule and I understand this is just inches and centimeters and millimeters. My point is that any bot operator needs only to be sensitive to feedback from editors if their objections are predicated on the proper practices within that art as evidenced by most-reliable RSs. I have every confidence that Lightmouse understands this and embraces the principal. So long as these sensitivities (false precision as well as practices within a given art that are an exception to the rule) are embraced going into this, then I see no reason not to allow bot activity to commence; complex bot activity is often an evolving thing. Greg L (talk) 17:54, 23 May 2011 (UTC)
 * (OT) Well, using "nm" without either giving the spelled-out name on the first occurrence or a conversion to kilometres (and possibly to statutes miles too) is an abomination IMO, and not just because it happens to also be the symbol for the nanometre. :-) ― A. di M.​plé​dréachtaí 19:47, 23 May 2011 (UTC)
 * Yes, I agree 100%. Greg L (talk) 02:41, 24 May 2011 (UTC)

I've opened a new discussion about this at Template talk:Convert. ― A. di M.​plé​dréachtaí 20:04, 23 May 2011 (UTC)

[http://en.wikiquote.org/wiki/Voltaire "The best is the enemy of the good". Voltaire.] We now have a pragmatic approach that disconnects this bot application from the template default. I think it's a good idea to start with inches in the easier cases of engineering etc. With your further support, I'd be happy to start work, respond, make notes, and we all can see how good we are doing in real practical examples. Lightmouse (talk) 20:36, 23 May 2011 (UTC)
 * Sounds good. I take it that speed will be limited and the moment an editor raised an issue, the operation in that area would stop until sorted? Tony   (talk)  04:11, 24 May 2011 (UTC)

Unless anyone has a better idea, I propose a rate ramp. Until Lightbot10's 500th edit, it can do 50 per day. Until it's 1000th edit, it can do 100 per day. Until it's 2000th, 200 per day. Until it's 4000th, 400 per day. Until it's 8000th, 800 per day. Etc. That's easier to implement/audit than it is to explain.

If an editor raises an issue, I'll stop and discuss. I've had many welcome points raised over the years which have led to improvements. Some issues merely need clarification of what/why/how. Unit edits are often nuanced binary choices (such as mm/cm), regional/domain preference, matters of opinion or judgement. Such issues may need to be referred for community input via another forum e.g. mosnum or the template talk page. Does anybody else wish to comment? Lightmouse (talk) 11:37, 24 May 2011 (UTC)


 * The scope of this application is entirely contained within the scope of Bots/Requests for approval/Lightbot 13. If Lightbot13 is approved, this application will be withdrawn. Lightmouse (talk) 09:39, 15 June 2011 (UTC)


 * Alright, everyone has a chance to say there piece about it. Seems that the mm/cm thing isn't yet resolved. However, since this is the only thing holding it back, I'll approve all other length/area/volume conversions mentionned in this BRFA (so you can merge them with the "main" Lightbot code), and have an extended trial at a rate of 25 inch-->cm/mm conversions per day for a week for the new rule set you've devised. Headbomb {talk / contribs / physics / books} 16:19, 15 June 2011 (UTC)

Thanks. Note that Lightbot 5 and Lightbot10 (this one) are superceded by Lightbot13. It's a bit messy to have an caveat on this one but not mentioned on Lightbot13. Should we withdraw Lightbot5 and Lightbot10 and put the 'inch' caveat on Lightbot13? It's up to you. Lightmouse (talk) 16:43, 15 June 2011 (UTC)


 * The caveat applies to the inch-->mm/cm conversion in general, regardless of what BRFA "technically" covers it. Headbomb {talk / contribs / physics / books} 16:48, 15 June 2011 (UTC)

Understood. Thanks. Lightmouse (talk) 16:50, 15 June 2011 (UTC)


 * Due to workload, the trial is taking longer than a week. I've edited 75 articles. When I've edited 175 articles, I'll mark the trial as done. See: The edit summary is L10. inches. Lightmouse (talk) 12:23, 25 June 2011 (UTC)


 * Done. See contributions. Edit summary is L10. inches. Lightmouse (talk) 10:00, 29 June 2011 (UTC)


 * Alright, reviewing this. Sorry it took longer than expected. Headbomb {talk / contribs / physics / books} 17:10, 10 August 2011 (UTC)
 * The second conversion is wrong.
 * This is wrong too.
 * Not "wrong", but should be better Headbomb {talk / contribs / physics / books} 17:28, 10 August 2011 (UTC)


 * The_Last_Command: As a class, multiple dimensions are more of a challenge than ' '. The conversion "6.8 x 4.2 x 1.1 inches (28 mm)" isn't wrong. It's a correct conversion of only one of three dimensions. I agree with you it's definitely better to have all values within multiples converted. For some reason I spotted the first multiple but not the second.
 * United_States_Bakery: As a class, combination units ('x feet, y inches') are more a challenge than ' '. Yes, that's wrong. Of the three things you've spotted, that's the one that's worst. You'll see that I did fix it later. It's why I haven't done routine runs on inches. But with a bit more effort I think I can do some focussed work on them.
 * Chimney_sweep: As in The_Last_Command, it's a multiple dimension. It may be possible, given more time and experience, to target common range formats.
 * A great deal of my processing and code effort is spent addressing this issue. As I've suggested before, inch conversions usually involve more human processing and human oversight than most other units. That one slipped through. In my routine process and code, I don't do inches. If you permit me to to tackle inches, I can focus on these sort of issues and do dedicated well-overseen runs. Thanks. Lightmouse (talk) 18:14, 10 August 2011 (UTC)

This BRFA has been superceded by Bots/Requests for approval/Lightbot 13 and is no longer required. Withdrawn. Regards Lightmouse (talk) 12:03, 29 August 2011 (UTC)
 * Ok. . Anomie⚔ 15:15, 29 August 2011 (UTC)
 * 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.