Page MenuHomePhabricator

False positive yearLink check
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

What happens?:

image.png (1,268×360 px, 165 KB)

Other examples:
E.g. in the table at https://en.wikipedia.org/w/index.php?title=N%C3%BCrburgring&oldid=1345190670#Modern_N%C3%BCrburgring E.g.

image.png (966×306 px, 77 KB)

E.g. at https://ru.wikipedia.org/wiki/Третья_гражданская_война_в_Судане#Реакция

image.png (1,322×311 px, 132 KB)

One suggested potential solution from an Ruwiki editor is:

Perhaps we should change it to look for the same number of digits in the first and second cases.
Something like looking for the difference between 2005 and 2010.

Event Timeline

We found many year links of the style "1997 in politics" or "2003 in sport". Without an understanding of linguistics, these are indistinguishable from "GeForce 5090" which could create an issue if linked like [[GeForce 5000 series|GeForce 5090]].

Perhaps we should change it to look for the same number of digits in the first and second cases. Something like looking for the difference between 2005 and 2010.

There are a number of hueristics that could improve the situation but we will always have false positives if we try to detect number+text.

  • Exclude far-future years e.g <2100
  • Exclude distance past years, e.g. four digit only
  • Exclude zero groups "000"
  • As suggested above, look for small differences (although there could still be typos like [[1995|199]])

We may also just have to limit to year-only links for now.

Change #1276702 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] YearLinkEditCheck: Only match when link target is definitely a year

https://gerrit.wikimedia.org/r/1276702

Change #1276702 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] YearLinkEditCheck: Only match when link target is definitely a year

https://gerrit.wikimedia.org/r/1276702