Ankry added a comment.

  In T128173#6214317 <https://phabricator.wikimedia.org/T128173#6214317>, @Tpt 
wrote:
  
  > I believe that the approach would be:
  > For each language:
  >
  > 1. If there is a local inter-language link to this language in the wikitext 
of the page, use it and stop the lookup.
  > 2. If there is a sitelink to this language in the Wikidata item of the 
page, use it and stop the lookup.
  > 3. If there is a sitelink to this language in a Wikidata item connected to 
the Wikidata item of the page using edition of (P629) 
<https://www.wikidata.org/wiki/Property:P629>, use it and stop the lookup.
  > 4. If there is a sitelink to this language in a Wikidata item connected to 
the Wikidata item of the page using edition (P747) 
<https://www.wikidata.org/wiki/Property:P747>, use it and stop the lookup.
  > 5. If there is a sitelink to this language in a Wikidata item connected to 
the Wikidata work item using edition (P747) 
<https://www.wikidata.org/wiki/Property:P747>, the work item being connected to 
the Wikidata item of the page using edition of (P629) 
<https://www.wikidata.org/wiki/Property:P629>, use it.
  >
  > This way, I think we cover all the use cases. 1, 2 and now 3 are already 
implemented.
  
  Thanks for claryfying. However, I have few questios:
  
  1. If I understand properly, after finding (3) you do not intend to look for 
(5). Eg. for 
https://fr.wikisource.org/wiki/Hamlet/Traduction_Hugo,_1865/Le_premier_Hamlet 
and lang=en you will list interwiki to the work page 
https://en.wikisource.org/wiki/Hamlet_(Shakespeare), and not to the particular 
edition pages. Am I right? (Well, this significanly minimizes the iw link 
number, but makes tools like doublewiki useless)
  2. Concerning (4): multiple  edition (P747) 
<https://www.wikidata.org/wiki/Property:P747> items for a specific language may 
exist; do you think to find only the first, random one?
  3. What do you think of handling pages with multiple edition of (P629) 
<https://www.wikidata.org/wiki/Property:P629>: get first of them (a random 
one), all of them, first with sitelinks? See the list 
<https://query.wikidata.org/#%23Buildings%20in%20more%20than%20one%20country%0A%23added%20before%202016-10%0ASELECT%20%3Fitem%20%3Fcount%0AWHERE%0A%7B%0A%20%20%7B%0A%20%20%20%20SELECT%20%3Fitem%20%28COUNT%28DISTINCT%20%3Fwork%29%20AS%20%3Fcount%29%20WHERE%20%7B%0A%20%20%20%20%20%20%3Fitem%20wdt%3AP629%20%3Fwork%20.%0A%20%20%20%20%20%20%3FwikisourceSitelink%20schema%3AisPartOf%20%5B%20wikibase%3AwikiGroup%20%22wikisource%22%20%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20schema%3Aabout%20%3Fitem.%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fitem%0A%20%20%7D%0A%20%20FILTER%20%28%20%3Fcount%20%3E%201%20%29%0A%7D%0A>.
 I am not sure if they all can be considered misuse of the property.
  4. The procedure will handle most of simple work/edition cases. However, some 
works already have more complex structure in Wikidata, eg Bible (Q20821062) 
<https://www.wikidata.org/wiki/Q20821062>. It has a multi-level structure of 
//editions of translations// or //editions of editions//. In userspace tools 
this is handled by a recursive search for the //root// work item (with 
recursion level limitted, currently to 3). Do you think that it is possible to 
handle such structures in future? (I realize that unhandled loop server-side is 
much more dangerous than user-side, where it would kill the browser in the 
worst case)
  
  BTW, if there is a better place to discuss such issues, please advice.

TASK DETAIL
  https://phabricator.wikimedia.org/T128173

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Ankry
Cc: Addshore, Uzume, Vladis13, beleg_tal, MJL, JAnD, Tpt, PokestarFan, 
Hsarrazin, Bodhisattwa, Billinghurst, MF-Warburg, Purodha, Ankry, Candalua, 
Gymel, Aklapper, iecetcwcpggwqpgciazwvzpfjpwomjxn, StudiesWorld, Iflorez, 
darthmon_wmde, alaa_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, Mahir256, 
QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Samwilson, 
Wikidata-bugs, aude, jayvdb, Shizhao, Lydia_Pintscher, Mbch331, jayantanth, 
Ltrlg, Krenair
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to