Page MenuHomePhabricator

solve_disambiguation.py gives possibilities from {{disambiguation}}
Open, MediumPublic

Description

pwb.py solve_disambiguation -start:V

Alternatives for [[cs:Yogyakarta]]

   1 - Indonésie
   2 - Jáva
   3 - Provincie Indonésie
   4 - Sultanát Yogyakarta
   5 - Wikipedie:Název článku
   6 - Wikipedie:Odkaz na rozcestník
   7 - Wikipedie:Rozcestníky
   8 - Wikipedie:Článek
   9 - Yogyakarta (město)
  10 - Yogyakarta (provincie)
  11 - sultanát

Found 5 references.
Will work on 4 pages.
Retrieving 4 pages from wikipedia:cs.

...

5,6,7 and 8 are not in the text of page but in {{Rozcestník}} ({disambig}}) template

Event Timeline

JAnD raised the priority of this task from to Medium.
JAnD updated the task description. (Show Details)
JAnD added a subscriber: JAnD.

The issue is that Page.linkedPages does not support ignoring the links from transcluded templates.

As a workaround, we can parse the page content directly, but the process is error-prone. Having mwparserfromhell can help.

Change 372064 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Exclude links in disambiguation templates from possibilities

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

Dvorapa added a subscriber: Dvorapa.

Maybe easier would be just to find templates by regex, for each of them list template.linkedPages and then remove those links from Page.linkedPages

Change 372064 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Exclude links in disambiguation templates from possibilities

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

Change 407891 had a related patch set uploaded (by Xqt; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Exclude links in disambiguation templates from possibilities

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

I reverted this patch due to to many problems shown by tests

Xqt renamed this task from solve_disambigaution.py gives possibilities from {{disambiguation}} to solve_disambiguation.py gives possibilities from {{disambiguation}}.Apr 12 2018, 1:39 PM
Dvorapa changed the task status from Open to Stalled.May 22 2018, 5:46 PM
Dvorapa moved this task from Backlog to Waiting on other changes on the Pywikibot board.

Change 463628 had a related patch set uploaded (by Dvorapa; owner: Dvorapa):
[pywikibot/core@master] [IMPR] Exclude links in disambiguation templates from possibilities

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

Dvorapa changed the task status from Stalled to Open.Sep 29 2018, 11:41 PM
Dvorapa moved this task from Waiting on other changes to Needs Review on the Pywikibot board.

Not actively working on it