Wikipedia:Bots/Requests for approval/PharyngealBOT 2
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was
Approved.
New to bots on Wikipedia? Read these primers!
- Approval process – How this discussion works
- Overview/Policy – What bots are/What they can (or can't) do
- Dictionary – Explains bot-related jargon
Operator: PharyngealImplosive7 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 23:27, Monday, April 21, 2025 (UTC)
Function overview: Will convert {{IPA}}
templates to {{IPA link}}
in phonetic tables
Automatic, Supervised, or Manual: manual
Programming language(s): Pywikibot on PAWS
Source code available: github repository
Links to relevant discussions (where appropriate): Not controversial; it is usually better for people to be able to go to the wikipedia article for a phonetic symbol
Edit period(s): Daily to weekly (depending on how much I run the script on my computer)
Estimated number of pages affected: Maybe 10-20% of the pages in [[Category:Languages]]? (wild estimate)
Namespace(s): Mainspace
Exclusion compliant (Yes/No): Yes (pywikibot does this by default)
Already has a bot flag (Yes/No): No
Function details:
- Checks articles that I manually input to see whether they have tables with the
{{IPA}}
template instead of the{{IPA link}}
template - Replaces all instances of these templates with the
{{IPA link}}
template - Ignores templates that have IPA longer than 5 characters ignoring spaces and brackets (these usually are IPA transcriptions of a word and not one symbol)
- Moves parentheses and brackets to not break the IPA link template (so {{IPA|(p)}} to ({{IPA link|p}})
- Manual to reduce FPs (it may replace IPA templates outside of phonetic tables)
- Splits IPA templates with symbols separated by spaces (i.e. {{IPA|[m] p}} would become [{{IPA link|m}}] {{IPA link|p}}) to avoid breaking the IPA link template
- Example edits that the bot could do: Special:Diff/1286776857, Special:Diff/1287404083
Discussion
[edit]- Isn't Pywikibot by default exclusion compliant when saving without using the force parameter? Tenshi! (Talk page) 12:20, 25 April 2025 (UTC)[reply]
- Yeah, I think you're right. I'll fix the info on the BRFA. – PharyngealImplosive7 (talk) 13:33, 25 April 2025 (UTC)[reply]
- {{BAG assistance needed}} – PharyngealImplosive7 (talk) 01:45, 29 April 2025 (UTC)[reply]
- @PharyngealImplosive7: Could this lead to red links being created? This is strictly for tables, right? Just wanting to double-check that. --TheSandDoctor Talk 22:11, 30 April 2025 (UTC)[reply]
- @TheSandDoctor: Yes this is strictly for tables, and that is why the bot is manual to avoid any false positives. (If you look at the code, you should find a check that requires the user to manually confirm before the edit is saved). The
{{IPA link}}
template itself also will not create red links, as if a symbol is put in the template not found in Module:IPA symbol/data, it will return an error. – PharyngealImplosive7 (talk) 22:18, 30 April 2025 (UTC)[reply]- @PharyngealImplosive7: Thank you.
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. --TheSandDoctor Talk 13:38, 1 May 2025 (UTC)[reply]
Trial complete. @TheSandDoctor: see the bot's contributions (sorry I went slightly over the limit, I lost some of my code and needed to do some testing)
- Here is my analysis and modifications I made:
- Added a new check to make sure tables have 3+ phonetic terms before adding IPA links (to reduce false positives)
- Skips tables with “diphthong” or “translation” in them (often have false positives, and diphthong symbols break the
{{IPA link}}
template) - Skip segments longer than 1 character unless they have tiebar, are a click/ejective/affricate/etc, or have superscript to indicate aspiration, palatalization, labialization, etc.
- Fixed an internal bracket issue; see Special:Diff/1288492149 (wrong) vs Special:Diff/1288496425 (correct)
- Made the bot recognize tildes, slashes, commas, and spaces to separate multiple symbols in one IPA template (see Special:Diff/1288362023)
- I think the bot works well enough to be approved, and the manual nature of the bot should prevent false positives. – PharyngealImplosive7 (talk) 01:43, 3 May 2025 (UTC)[reply]
- Also note I've updated the code at User:PharyngealImplosive7/IPAlinker.py to correspond with the version I'm using on PAWS. – PharyngealImplosive7 (talk) – PharyngealImplosive7 (talk) 05:11, 4 May 2025 (UTC)[reply]
- Thanks, PharyngealImplosive7. I don't see any issues based on spot checking some diffs. I appreciate the honesty in calling out where it went wrong and demonstrating that corrections have been made to the code; edge cases tend to pop up from time to time, usually when you least expect it. I think we should leave this open for a little while for any comment that may come in but otherwise I will be back here in a couple days to approve. Please ping me if I haven't gotten back to this in 2-3. TheSandDoctor Talk 06:05, 4 May 2025 (UTC)[reply]
- @TheSandDoctor: Any update? – PharyngealImplosive7 (talk) 13:31, 7 May 2025 (UTC)[reply]
- Also note I forgot one update I made. I added caching to increase the script's speed. – PharyngealImplosive7 (talk) 17:24, 9 May 2025 (UTC)[reply]
- @TheSandDoctor: Any update? – PharyngealImplosive7 (talk) 13:31, 7 May 2025 (UTC)[reply]
- Thanks, PharyngealImplosive7. I don't see any issues based on spot checking some diffs. I appreciate the honesty in calling out where it went wrong and demonstrating that corrections have been made to the code; edge cases tend to pop up from time to time, usually when you least expect it. I think we should leave this open for a little while for any comment that may come in but otherwise I will be back here in a couple days to approve. Please ping me if I haven't gotten back to this in 2-3. TheSandDoctor Talk 06:05, 4 May 2025 (UTC)[reply]
- Also note I've updated the code at User:PharyngealImplosive7/IPAlinker.py to correspond with the version I'm using on PAWS. – PharyngealImplosive7 (talk) – PharyngealImplosive7 (talk) 05:11, 4 May 2025 (UTC)[reply]
- @PharyngealImplosive7: Thank you.
- @TheSandDoctor: Yes this is strictly for tables, and that is why the bot is manual to avoid any false positives. (If you look at the code, you should find a check that requires the user to manually confirm before the edit is saved). The
Apologies for the delay, PharyngealImplosive7. No one seems to have objected so Approved.. Under normal circumstances, I would prefer to leave the close for someone else. However, given the backlog, lack of recent BAG activity (myself included), and the fact that this task is uncontroversial and based on how well the trial went, I am inclined to make an exception for this. As per usual, if amendments to - or clarifications regarding - this approval are needed, please start a discussion on the talk page and ping. --TheSandDoctor Talk 13:01, 12 May 2025 (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 Wikipedia:Bots/Noticeboard.