Page MenuHomePhabricator

[timebox 4h] Merging lexemes
Closed, ResolvedPublic

Description

Research for T189129

  • how does merging for items currently work?
    • API, special page, gadget in place for that
    • help page in place that explains how item merging works
  • conceptual questions regarding the merging of lexeme properties
    • forms should be considered
    • senses do not have to be considered, yet (covered by hike implementing T195652 ff.)
  • document findings

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptJun 6 2018, 1:48 PM

senses do not have to be considered, yet (covered by hike implementing T195652 ff.)

If senses are not covered by this ticket @Lydia_Pintscher then we should have a seperate ticket in the senses hike for merging senses (which I don't think we do right now)

Assumptions not (yet) explicitly mentioned in the ticket (T189129)

  • lexemes with different lexical category or language cannot be merged
  • merging of lemmas works like merging labels (identical ones ignored, others added to the target)

Conceptual Questions

  • Do we create a new special page? Special:MergeLexemes? UX!?
  • Do we create a new API endpoint? wblmergelexemes?
  • What happens if one lexeme links to a form of the other lexeme? Do we abort the merge?
  • What happens if a form has a subset of the representations of a form on the other lexeme? (e.g. en: colors, en-gb: colours vs only en:colors)
  • What happens if a form has a subset of the grammatical features of a form on the other lexeme? (e.g. 1st person singular, nominative vs only 1st person singular)

To be tested

  • What happens to statements that reference the Lexeme that got merged into the other? Does that magically work through redirects?
  • Make sure statements linking to merged/"deleted" deleted forms does not explode?

Technical investigation starts here.

Item Merging

  • API endpoint: Wikibase\Repo\Api\MergeItems
  • Special page: Wikibase\Repo\Specials\SpecialMergeItems
  • shared between API and special page: Wikibase\Repo\Interactors\ItemMergeInteractor
  • ItemMergeInteractor basically does all the things
    • loads entities from ID
    • applies merge ChangeOps
    • saves
    • updates WatchList
  • ChangeOpsMerge
    • generates label, description, alias, sitelink and statement ChangeOps
    • not great: validation happens sprinkled across methods (e.g. link check in generateStatementsChangeOps)
Vvjjkkii renamed this task from [timebox 4h] Merging lexemes to hjbaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Jakob_WMDE as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii added a subscriber: Jakob_WMDE.
CommunityTechBot renamed this task from hjbaaaaaaa to [timebox 4h] Merging lexemes.Jul 2 2018, 3:15 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Jakob_WMDE.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot removed a subscriber: Jakob_WMDE.