Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added projects: Wikidata Lexicographical data, Wikidata, 
All-and-every-Wiktionary, wdwb-tech.

TASK DESCRIPTION
  Currently, the `mw.wikibase.lexeme` module has the following methods:
  
  - `getLemmas( id )`
  - `getLanguage( id )`
  - `getLexicalCategory( id )`
  - `splitLexemeId( id )`
  
  The first three are equivalent to calling the method of the same name, 
without arguments, on the result of `mw.wikibase.getEntity( id )`. I propose we 
remove them, to reduce duplication in the interface; I don’t think it’s useful 
to have them. (`splitLexemeId` is useful and can be kept, it’s not a method 
that can be called on an individual lexeme entity.)
  
  In Wikibase, for items and properties, there’s similar duplication in some 
methods (related to labels and descriptions). However, Wikibase can actually 
look up item/property labels/descriptions more efficiently in this case, by 
getting them from the term store, without loading the full entity. For lexemes, 
there’s no such secondary storage, and 
`getLemmas`/`getLanguage`/`getLexicalCategory` are implemented in PHP by 
loading the full entity and getting the information from it, which is only 
marginally more efficient than loading the full entity into Lua and then 
getting the information from it there. In this way, I think the 
`mw.wikibase.lexeme` functions are not only redundant, but arguably confusing, 
since users familiar with the Wikibase lua interface might expect those 
functions to not count against the entity limit, whereas they actually do count 
against it. And I don’t think we’ll have a secondary storage comparable to the 
terms store for lexemes in the foreseeable future; if we add it at some point, 
we can still add those functions then, when they actually have the potential to 
be more efficient.

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

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

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, 
Gq86, GoranSMilovanovic, Mahir256, QZanden, LawExplorer, _jensen, rosalieper, 
Bodhisattwa, Scott_WUaS, jberkel, Psychoslave, Wikidata-bugs, aude, Shizhao, 
Nemo_bis, Darkdadaah, Addshore, Mbch331, Ltrlg, Krenair
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to