Wikipedia:Bots/Requests for approval/PotatoBot 7
- 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: Anypodetos (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 21:14, Wednesday April 16, 2014 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python, PyWikipediaBot
Source code available: User:PotatoBot/Code/7
Function overview: Adds Glottolog codes (i.e. the glotto=
parameter) to language infoboxes.
Links to relevant discussions (where appropriate): User talk:PotatoBot#PotatoBot for Glottolog codes?
Edit period(s): One time run; probably additional runs as necessary (e.g. if new Glottolog codes are assigned)
Estimated number of pages affected: ~8000
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details: Takes Glottolog codes, ISO 639-3 codes and Wikipedia page names from the database on Wikipedia:WikiProject Languages/Glottolog 2.2 language names. Cross-checks the ISO parameter(s) (iso3, lc1..30, ld1..30
) and adds the Glottolog code, in form of a glotto=
parameter, to the {{Infobox language}} on the target page (after resolving redirects). The bot does nothing if
- the target page doesn't exist or is actually a section
- the target page hasn't got a language infobox
- the infobox already has got a glotto parameter (including
glotto2...9
) - the ISO parameter cannot be verified (the infobox has an ISO parameter that doesn't match the database, or there are several ISO parameters, or none)
Such cases are logged to the bot's user space (sample output).
As the glotto parameter creates a ref, the bot also checks for an existing references section and adds it if necessary (using PyWikipediaBot's noreferences module).
Note from operator: I'll be away from 19 April to 25 April.
Discussion
editWe've been adding Glottolog codes, parallel to ISO codes, for some time now. What I envision is that obscure language articles, which are unlikely to ever get much attention from us, will each have at least two references: One to the ISO code, which is a common means to distinguish languages in the literature, and through it to the Ethnologue article which was the basis of the ISO code; and one to Glottolog, where readers can find an extensive bibliography on the language, as well as a more rigorous (and more conservative) classification than the unreferenced, computer-generated, and error-prone classifications at Ethnologue. Both include live links.
Glottolog was established by the Max Planck Institute as a parallel to Ethnologue, which suffers from some serious deficiencies that make its use as a RS problematic. Thousands of our articles are currently sourced solely to ISO/Ethnologue, which is inadequate per our guidelines: Although few of them are tagged for ref improvement, they really should be, even for stubs. (I say that as one who sourced thousands of them to ISO/Ethnologue in the first place.) Most Ethologue entries do not specify their own sources, or give only a partial account of their sources, with no review of the literature. Glottolog intends to rectify that: With the more obscure languages, they provide every source on the language that the editors at the MPI have been able to find, going back centuries in some cases. (On the other hand, Glottolog does not address demographic information the way Ethnologue does, so they complement each other.) I've added Glottolog codes and links to 1,800 articles, and there have been no complaints. What we're proposing here is to automate only the most obvious cases: Where there's a one-to-one-to-one correspondence between Glottolog, ISO/Ethnologue, and Wikipedia. The remaining ca. thousand (?) cases will be done by hand.
I've posted this request at WP:WikiProject Languages.
The code correspondences we have are for Glottolog 2.2. As with the quadrennial updates to Ethnologue, we'll want to update this when Glottolog 2.3 comes out. — kwami (talk) 02:17, 17 April 2014 (UTC)[reply]
{{BAGAssistanceNeeded}} --ἀνυπόδητος (talk) 16:39, 27 April 2014 (UTC)[reply]
- Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Max Semenik (talk) 01:17, 4 May 2014 (UTC)[reply]
- Trial complete.
- Special:Contributions/PotatoBot. No problems found (after I had some trouble with my old Python version, which I have updated now). One minor point is that, while the bot adds a references section if necessary, it doesn't remove {{Unreferenced}} templates [1]. Should it replace them with {{Refimprove}} or just leave them? --ἀνυπόδητος (talk) 08:24, 5 May 2014 (UTC)[reply]
- I'd say log for manual review. That had two refs, which was plenty for a stub like that. — kwami (talk) 21:06, 5 May 2014 (UTC)[reply]
- Perhaps add the Glottolog name as well, as here[2]? I was going to say, add it if it differs from the article name, but if we include it every time, then we don't need to worry about the names getting out of sync if we move the article later. (The Glottolog ref template inherits the name of the article if a name is not specified.)
- I checked all 50 articles, and the results look good. — kwami (talk) 21:11, 5 May 2014 (UTC)[reply]
- Is the Glottolog name always the display name of the link in WP:WikiProject Languages/Glottolog 2.2 language names, i.e. "Aari" in the line
aari1239 [[ISO 639:aiw|[aiw]]] [[Aari language|Aari]]
- ? --ἀνυπόδητος (talk) 18:46, 6 May 2014 (UTC)[reply]
- Exactly. That line was originally
aari1239 aiw Aari
. I used AWB to convert the ISO codes and language names into links. Many of the language names were red links at first; I created rd's for them so that we'd support both the ISO and Glottolog names. (Because of this, we now have better support for Glottolog names than we do for Ethnologue names, since the latter have never been thoroughly tested.) You'll notice that when a Glottolog code has no corresponding ISO code (covered by generic "[mis]"), the name is often a red link, because there is no one-to-one correspondence with an ISO name to link it to. — kwami (talk) 23:21, 6 May 2014 (UTC)[reply]- Done.
glottorefname
parameters are now added as well, but only if (1) aglotto
param is added and (2) noglottorefname
is already present. Other cases will be logged, but not edited. Could someone of BAG now take us to the next step? --ἀνυπόδητος (talk) 15:25, 8 May 2014 (UTC)[reply]
- Done.
- Exactly. That line was originally
{{BAGAssistanceNeeded}} --ἀνυπόδητος (talk) 08:45, 19 May 2014 (UTC)[reply]
- Approved. Good work. Sorry for the delay. — Earwig talk 17:19, 31 May 2014 (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.