Page MenuHomePhabricator

Detect and extend known title <-> entity links in a semi-automatic way
Closed, DeclinedPublic

Description

When one template or one module initiates an initial link, wikibase could record the ( title <-> entity ) link.
Link exemple ( item = id, guide = new, project = wikisource, namespace = Author )
Later, wikibase could re-use this link from the item to the modules in the page across the call of mw.wikibase.getEntityIdForCurrentPage()
Later also, wikibase could re-use this link in other namespaces, in other projects and in other languages.

If we give to modules the wikibase item.id linked to the title:

  • The module writer have not to search it.
  • That is made only once for each title.
  • The expensive function to find it is no more needed.
  • The item.id become a part of the title and is easy to get.

Event Timeline

Rical created this task.Apr 24 2016, 2:49 PM
Rical updated the task description. (Show Details)Apr 24 2016, 3:59 PM

Rical: I am sorry but I don't understand. Is this something that is happening and you'd like it to not happen? Or is it not happening and you want it to happen? What do you want to do that is difficult without this change?

Rical renamed this task from Any title in wikibase give its id to modules to Any title in wikibase can give its item id to modules.May 3 2016, 1:53 PM
Rical updated the task description. (Show Details)
hoo added a comment.May 3 2016, 1:57 PM

So you want us to add the item id to https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_library? This poses the same usage tracking problems T74815 does.

Rical added a comment.May 3 2016, 3:10 PM

In T133498#2260063, hoo said "This poses the same usage tracking problems T74815 does."

Yes to add to reference manual.

That is made only once for each title in each language in each project. Not at each invoke of the title.
Also in wikisource, for authors like Victor Hugo after all properties, we have tables to make the links.

This "tool" was made by Tpt and now we make the link manualy for each title. In my memory, to link each item to the namespace Author: in wikisource.
Can we make bots to link existing pages and future new pages, following some adequate rules?
And can we reduce human efforts to exceptional cases?

Nemo_bis removed a subscriber: Nemo_bis.May 3 2016, 7:45 PM
Rical added a comment.May 20 2016, 4:36 PM

More precision:
In wikidata, for authors like Victor Hugo present in wikisource, after all properties, the wikidata item have tables to make the links between wikidata and wikisource.
This "tool" was made by Tpt... see behind : T133498#2260316

Rical added a comment.Aug 10 2016, 9:39 AM

Proposition to detect and to extend known title <-> entity links in a semi-automatic way:

  • One template or one module initiates an initial link when it give a first entity id, in one wiki project, in one language.
  • Then a reverse link can start from this entity to other modules in pages with the same title, in some namespaces, in the same wiki project.
  • Then the same link can start from this entity to any pages with the same title in other wiki projects in the same language.
  • Then the same link can start from translations of this entity in the same wiki projects in other languages.
  • Link exemple ( item = id, guide = new, project = wikisource, namespace = Author )
  • Then modules in all these titles can easily find there item id from mw.wikibase.getEntityIdForCurrentPage() already existing but not functional.

Of course all that need some cautions:

  • Each reverse link can start only some days after initial link, in case of revert.
  • Several initial link can accelerate a reverse link.
  • Some modules can link to other entities by arbitrary acces and must not disturb the stability. That could also happen in titles where there are 2 linked entities like famous father and son.
  • Voluntary registered links confirmations seems necessary to solve any complex cases. See exemple in Victor Hugo = Q535 and search "Wikisource".

Long term stability:

  • When domains of stability are confirmed by large acceptations, initial link can desappear.
  • At any time and anywhere a divergent link can appear and must be accepted to start a new stable domain.
  • In case of a title included in more than one stable domain, the tracking selector type can guide the tracking logic to avoid ambiguity.
Rical renamed this task from Any title in wikibase can give its item id to modules to Detect and extend known title <-> entity links in a semi-automatic way.Aug 10 2016, 10:07 AM
Rical updated the task description. (Show Details)
Rical added a subscriber: Tpt.
hoo closed this task as Declined.Aug 11 2016, 12:03 AM

I don't think we want logic like this in Wikibase (or any related component). Wikidata is supposed to be a "stupid" data store, without content altering functionality on its own (writes are performed by users only).

Sitelinks and other external ids are usually a 1:1 mapping directly stored within Wikidata items. It's possible and might be desirable to extend upon by using well defined and hard coded rules, like "forward" sitelinks to language subpages, but I don't think we want and will have behavior as described here anytime soon.

Due to the complexity of this, I suggest to rather focus on developing solutions for certain narrow use cases (like the language subpages I mentioned earlier).

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptAug 11 2016, 12:03 AM
Rical added a comment.Aug 11 2016, 7:04 AM

I agree that only humans can decide. For this we could restrict my propositon in this way:

  • The sitelinks extender propose each new link at patrollers, in Wikiprojects and in Wikibase
  • if 3 patrollers validate the new link, the extender records the new link.
  • The sitelinks extender can propose new links only if 2 templates or modules already define the correspondance.

Following these rules, or better ones, the extender can help to create a hight number of sure new links for many modules.

Rical removed a subscriber: Rical.Jul 21 2017, 10:29 AM