[Spike 4 hours] Can we extract links from disambiguation pages so they can be presented natively?
Closed, ResolvedPublic

Description

Disambiguations as cards don't make much sense and styling is pretty bad.

Spike questions:

  • Can we exclude disambiguation and just include the search results? (is there a parameter we can pass search?)
  • Can we detect when a page is a disambiguation page?
  • Can we extract disambiguation links from the page?

Spike answers:

  • Can we exclude disambiguation and just include the search results? (is there a parameter we can pass search?)

YES - sort of! @Deskana says he doesn't think search api presently supports excluding disambig results, however the search api can tell us if a results is a disambig (or mainpage!) so we can choose to hide those. Example here: https://github.com/montehurd/apps-ios-wikipedia/commits/disambigSpike
Basically add the bold parts below to our search parameters:

@"prop": @"pageterms|pageimages|pageprops",
@"ppprop": @"mainpage|disambiguation",


  • Can we detect when a page is a disambiguation page? ***

YES! The "mobileview" query can be configured to tell us if a page is a disambig/mainpage too!
https://github.com/montehurd/apps-ios-wikipedia/commit/d30d62db112a0b612e0c8bb0df06fcb374272755


  • Can we extract disambiguation links from the page? ***

YES! See @Reedy's answer in the comments.

Fjalapeno updated the task description. (Show Details)
Fjalapeno raised the priority of this task from to Needs Triage.
Fjalapeno moved this task to Needs Estimation on the Wikipedia-iOS-App-Backlog board.
Fjalapeno added a subscriber: Fjalapeno.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 17 2015, 3:17 PM
Fjalapeno updated the task description. (Show Details)Aug 21 2015, 6:55 PM
Fjalapeno set Security to None.
Fjalapeno renamed this task from [Spike 2 hours] Can we extract links from disambiguation pages so they can be presented natively? to [Spike 4 hours] Can we extract links from disambiguation pages so they can be presented natively?.
Mhurd updated the task description. (Show Details)Aug 25 2015, 8:23 PM
Mhurd updated the task description. (Show Details)Aug 25 2015, 8:27 PM
Mhurd claimed this task.
Mhurd updated the task description. (Show Details)
Mhurd updated the task description. (Show Details)
Mhurd updated the task description. (Show Details)Aug 25 2015, 9:26 PM
Mhurd updated the task description. (Show Details)
Mhurd updated the task description. (Show Details)
Mhurd updated the task description. (Show Details)
Mhurd updated the task description. (Show Details)
Reedy added a subscriber: Reedy.Aug 25 2015, 9:31 PM

You can extract links from a disambiguation page from the API like you can from any other page https://en.wikipedia.org/w/api.php?action=query&prop=links&titles=Paris%20(disambiguation)&pllimit=max

You'll miss some context data though such as on https://en.wikipedia.org/wiki/Paris_(disambiguation)

Mhurd updated the task description. (Show Details)Aug 25 2015, 9:33 PM
Mhurd updated the task description. (Show Details)Aug 25 2015, 9:37 PM
Mhurd updated the task description. (Show Details)Aug 25 2015, 10:59 PM

The mobileview api can tell us if a page is disambig too! :)

So if we arrive at an article either by search results or by link taps, we can know if the page is a disambig before doing anything with it.

I think we'll need fields for "isDisambiguation" and "isMainpage" or some such in the data layer...

@Reedy Awesome thanks! :)

Mhurd updated the task description. (Show Details)Aug 25 2015, 11:08 PM
Mhurd updated the task description. (Show Details)Aug 25 2015, 11:12 PM
Mhurd updated the task description. (Show Details)Aug 25 2015, 11:16 PM
Mhurd updated the task description. (Show Details)Aug 25 2015, 11:25 PM
Mhurd updated the task description. (Show Details)Aug 25 2015, 11:55 PM
Mhurd added a subscriber: Deskana.
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptJan 27 2016, 7:09 PM
MBinder_WMF closed this task as Resolved.Feb 8 2016, 7:32 PM