Cannabis Ruderalis

Plain DISAMBIG magic word

@Evad37: I just had a look over this module's code, and it seems to be missing the case when a user specifies a plain __DISAMBIG__ magic word without using a template. I'm not sure how many disambiguation pages actually do this, but it's probably worth putting it in. Best — Mr. Stradivarius ♪ talk ♪ 04:23, 20 October 2020 (UTC)[reply]

About 7 pages according to this search, most of which already have a disambiguation template. But yeah, probably still worth checking for it. - Evad37 [talk] 23:16, 20 October 2020 (UTC)[reply]
 Done - Evad37 [talk] 22:47, 25 October 2020 (UTC)[reply]
Thanks! Mr. Stradivarius ♪ talk ♪ 11:59, 29 October 2020 (UTC)[reply]

Not working?

  • {{#invoke:Disambiguation|isDisambiguationPage|Abbas Kola}} → yes
    Abbas Kola is a dab-page
  • {{#invoke:Disambiguation|isDisambiguationPage|Kamenitsa}} → yes
    Kamenitsa is a dab-page
  • {{#invoke:Disambiguation|isDisambiguationPage|List of schools in Ireland}} → yes
    List of schools in Ireland is a dab-page

— Martin (MSGJ · talk) 22:37, 21 October 2020 (UTC)[reply]

@Evad37: can any improvement be made here? — Martin (MSGJ · talk) 20:05, 25 October 2020 (UTC)[reply]
 Fixed, was missing the {{geodis}} and {{schooldis}} templates - Evad37 [talk] 22:47, 25 October 2020 (UTC)[reply]
Thanks! I'll do a bit more testing, then look to implement this module in the class mask template — Martin (MSGJ · talk) 12:46, 26 October 2020 (UTC)[reply]

Found another few:

  • {{#invoke:Disambiguation|isDisambiguationPage|K7}} → yes
    K7 is a dab-page
  • {{#invoke:Disambiguation|isDisambiguationPage|2600}} → yes
    2600 is a dab-page
  • {{#invoke:Disambiguation|isDisambiguationPage|Lost Battalion}} → yes
    Lost Battalion is a dab-page

— Martin (MSGJ · talk) 18:14, 26 October 2020 (UTC)[reply]

I tried to add {{mil-unit-dis}} to the module and failed miserably. Please can someone help with this? — Martin (MSGJ · talk) 12:11, 29 October 2020 (UTC)[reply]

Sandbox:
  • 2600 -> yes (numberdis)
  • K7 -> yes (Letter-Number Combination Disambiguation)
  • Lost Battalion -> yes (mil-unit-dis).
Something to do with the pattern looking for dashes earlier in the list? --Izno (talk) 15:47, 29 October 2020 (UTC)[reply]
(Maybe. Moving mil-unit-dis doesn't fix it. --Izno (talk) 15:50, 29 October 2020 (UTC))[reply]
The dashes need escaping with %, which I have now done — Martin (MSGJ · talk)

Set index article

A set index article is not a dab page, but I think it might be useful to be able to detect them, whether with this module or a different one — Martin (MSGJ · talk) 18:13, 26 October 2020 (UTC)[reply]

  • {{#invoke:Disambiguation|isDisambiguationPage|War of independence}}
    War of independence is a set index article

Tracking

Category:Disambiguation pages not detected by Module:Disambiguation lists 0 pages which are tagged with {{WikiProject Disambiguation}} but whose subject pages are not detected as being dab pages by this module. They consist of:

— Martin (MSGJ · talk) 12:04, 27 October 2020 (UTC)[reply]

Methodology

There are 32 templates in Category:Disambiguation message boxes. Each one may have several redirects (e.g. Template:Place name disambiguation has 7). That is a lot of possibilities to check for, and there is nothing to stop editors creating a new template (or redirect) at any time. Is there any better approach we could take? — Martin (MSGJ · talk) 12:32, 27 October 2020 (UTC)[reply]

We could have a bot update a list of disambiguation templates, I suppose. — Mr. Stradivarius ♪ talk ♪ 12:01, 29 October 2020 (UTC)[reply]
It might also help if I look to see which redirects are not being used much and take them to RfD. By the way, could you help me with the request above? — Martin (MSGJ · talk) 12:12, 29 October 2020 (UTC)[reply]

Templates

Template-protected edit request on 1 October 2021

Please change "[Ll]etter%-Number Combination Disambiguation" to "[Ll]etter%-[Nn]umber [Cc]ombination [Dd]isambiguation", so that articles with {{Letter-number combination disambiguation}} are also correctly identified. rchard2scout (talk) 09:20, 1 October 2021 (UTC)[reply]

 Done firefly ( t · c ) 09:29, 1 October 2021 (UTC)[reply]

Template-protected edit request on 1 October 2021 (2)

Please add the following list of templates:

	"[Mm]il-unit-disambig",
	"[Mm]ilitary unit disambiguation",
	"[Gg]eo-dis",
	"[Gg]eodisambig",
	"[Dd]isambig[Gg]eo",
	"[Dd]isambig[GN]",
	"[Dd]isambigNm",
	"[Dd]isambigName",
	"[Ss]urname",
	"[Ss]urnames",
	"[Ss]pecies Latin name disambiguation",
	"[Ss]peciesLatinNameDisambig",
	"[Ll]atinNameDisambig",
	"[Mm]athematical disambiguation",
	"[Mm]athematics disambiguation",
	"[Mm]athdab",
	"[Mm]ath dab",
	"[Rr]oad disambiguation",
	"[Rr]oaddis",

And change "[Gg]eodis" to "[Gg]eod[ai][bs]"

These were found by sampling pages in Category:Disambiguation pages not detected by Module:Disambiguation, and I think they'll cover the majority of pages that are not a set list.

I'm not very proficient in Lua string patterns, so it might be possible to merge some of the items in this list with smarter regexing (which might or might not impact performance, I have no idea). rchard2scout (talk) 10:28, 1 October 2021 (UTC)[reply]

@Rchard2scout Could we expand all templates (Special:ExpandTemplates – which in Lua seems to be frame:preprocess) and just check for __DISAMBIG__ in the expanded output? If possible, that would be accurate, though at the cost of performance. – SD0001 (talk) 10:40, 1 October 2021 (UTC)[reply]
I think that would be even better. It would certainly be cleaner and less likely to break. I have no idea of the performance cost of that. You could just try it (per WP:PERF) if you think it won't cause any huge problems. --rchard2scout (talk) 10:59, 1 October 2021 (UTC)[reply]
I wouldn't be surprised if this broke some transclusions. When wikitext is preprocessed in a Lua module, that counts towards the total Lua execution time for the page. If this time exceeds 10 seconds, then an error is shown and no more Lua modules are processed. If the page being tested happens to be a huge article that takes several seconds to render, then there is a good chance that the original page being rendered will go over the 10-second limit, particularly if it is using Module:Disambiguation multiple times. — Mr. Stradivarius ♪ talk ♪ 11:54, 22 October 2021 (UTC)[reply]

I have added those requested above — Martin (MSGJ · talk) 12:02, 25 October 2021 (UTC)[reply]

Template-protected edit request on 14 April 2022

Can "[Hh]ndab" and "[Gg]iven name" be added? Similar templates such as "[Hh][Nn][Dd][Ii][Ss]" and "[Ss]urname" are included. Michaelwallace22 (talk) 17:37, 14 April 2022 (UTC)[reply]

Given name and surname list pages are not disambiguation pages. olderwiser 17:42, 14 April 2022 (UTC)[reply]
 Not done as there is active discussion disputing this request above. If a consensus is reached please reactivate the edit request. — xaosflux Talk 15:50, 21 April 2022 (UTC)[reply]

Error

The module seems to identify Category:Disambig-Class biography articles as a disambiguation page (see the class rating on Category talk:Disambig-Class biography articles) probably because of the Disambig in the page title. — Martin (MSGJ · talk) 07:37, 21 April 2023 (UTC)[reply]

No, perhaps I'm wrong. The example below shows only the talk page is incorrectly identified — Martin (MSGJ · talk) 07:40, 21 April 2023 (UTC)[reply]

{{#invoke:Disambiguation|isDisambiguationPage|Category:Disambig-Class biography articles}}{{#invoke:Disambiguation|isDisambiguationPage|Category talk:Disambig-Class biography articles}}

 Resolved The module identifies Category talk:Disambig-Class biography articles as a dab page because it contains the template {{WikiProject Disambiguation}}. This could be fixed, but it's a minor issue — Martin (MSGJ · talk) 07:54, 21 April 2023 (UTC)[reply]

Performance issues

I've been doing some work to cut down on the execution speed of this module after Module:Class mask started using it, since it's been heavily impacting the execution time of Talk:World War II (To the point of occasional timeouts). I've implemented a faster version on the sandbox, and it works as expected, cutting down the execution time from ~8.5s to ~3.5s for the above talk page, and still detects pages as expected, but when I tried using mw.ustring instead of string to match how the current version works, it kills the performance. 2 Questions:

  1. How important is using mw.ustring here as opposed to string?
  2. Why does mw.ustring impact the performance so much?

Thanks. Aidan9382 (talk) 11:30, 27 April 2023 (UTC)[reply]

Leave a Reply