Page MenuHomePhabricator

Enable Lexeme access on first set of projects
Closed, ResolvedPublic

Description

Once T212843 is deployed, we can start enabling Lexeme access to a first set of projects for test reasons.

An obvious candidate is the beta cluster for the first deployment.

I see that fr.source has already a request pending in T203220
Given the descriptions of the use cases on fr.wikisource (linking individual words in texts) (the use cases, by the way, are enormously cool!) it is possible that we would very quickly have a lot of usage, and so I suggest we do not use it in the very first wave.

I know that some community members from other objects have expressed interest - but they often seem to come from large Wiktionaries (eg. ru.wikt, zh.wikt). I would recommend not to start with the large projects yet, because if something goes wrong it is more likely to cause issues due to size.

I am suggesting (entirely biased, obviously) as a community member to use hr.wikt as an early production project to try it out (so far no one stated opposition, and as you can see in the recent changes of hr.wikt, it is likely no one will, given the low activity level on the project): https://hr.wiktionary.org/wiki/Wje%C4%8Dnik:Konoba#Bilo_tko_protiv_eksperimentalna_upotrebe_Wikidate_za_leksikografske_podatke?

Another interesting candidate would be eu.wikt - maybe @Theklan would be interested to see if there is opposition.

Further thoughts?

Given the timing of the upcoming WikidataCon, it might be interesting to have this in place before the WikidataCon.

Event Timeline

Change 733089 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/mediawiki-config@master] [BETA CLUSTER] Enable WikibaseLexeme Scribunto access

https://gerrit.wikimedia.org/r/733089

Change 733089 merged by jenkins-bot:

[operations/mediawiki-config@master] [BETA CLUSTER] Enable WikibaseLexeme Scribunto access

https://gerrit.wikimedia.org/r/733089

I would like to propose bn.wiktionary as a test project for this, with an intended use case being the construction and display of inflection templates for nouns and verbs.

Hello! Just commented this at eu.wiktionary. I think there won't be any oposition, because there is no real community there now: https://eu.wiktionary.org/wiki/Wiktionary:Txokoa#Wikidatatik_milaka_hitz_ekartzeko_aukera

I would suggest that having 2-3 languages with really different situations (different alphabet, rtl...) would make this better as a showcase. So bn.wikt should be also a good guess to start with.

Mentioned in SAL (#wikimedia-operations) [2021-10-25T09:43:39Z] <lucaswerkmeister-wmde@deploy1002> Synchronized wmf-config/InitialiseSettings-labs.php: Config: [[gerrit:733089|[BETA CLUSTER] Enable WikibaseLexeme Scribunto access (T294159)]] (merged on Friday, syncing now to avoid outdated files even if it’s just -labs.php) (duration: 00m 55s)

It seems that the only user who has contributed in the last months to eu.wikt wants this to happen, so there won't be opposition. If we are planning to create a showcase scenario, it would be great to have a good way of implementation, using senses and declensions.

Change 734298 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[operations/mediawiki-config@master] Empty wikibase disabled access entity types on Beta

https://gerrit.wikimedia.org/r/734298

Change 734298 merged by jenkins-bot:

[operations/mediawiki-config@master] Empty wikibase disabled access entity types on Beta

https://gerrit.wikimedia.org/r/734298

Mentioned in SAL (#wikimedia-operations) [2021-10-25T16:08:52Z] <lucaswerkmeister-wmde@deploy1002> Synchronized wmf-config/InitialiseSettings-labs.php: Config: [[gerrit:734298|Empty wikibase disabled access entity types on Beta (T294159)]] (beta-only) (duration: 01m 47s)

I’ve just opened T294637: Improvements to the WikibaseLexeme Lua interface (before full rollout) as a parent task for various improvements we might want to make to the Lua interface before full deployment.

As long as Lexeme access is only enabled on the Beta cluster, I’d say we’re free to make any changes we want to the Lua interface, and break any on-wiki modules in the process. But I don’t know how easy it will be for interested communities to try out the Lua access while it’s only on Beta – which means we might not get the best possible feedback on the Lua interface.

Would any of the early adopter projects be willing to have Lexeme access enabled while the Lua interface isn’t stable yet – in the full understanding that we might still change the Lua interface, including in ways that would break the wiki? (We can discuss how exactly the changes will be made, how much advance notice you need etc., but in general I think we want some freedom to make breaking changes for at least the next few weeks.)

Would any of the early adopter projects be willing to have Lexeme access enabled while the Lua interface isn’t stable yet[...]?

I'd be interested in such a thing for bnwiktionary.

Alright, then let’s start with bnwiktionary, I think :)

Regarding stability, I was first thinking that we could try to keep methods for at least one MediaWiki train (usually = one week) before removing them, but then I realized that this isn’t really reliable. The train can be rolled back and forward across more than one version, especially if a train version is skipped (as has happened several times in the past week, this week, and will probably happen again over the holidays), so Lua code could still find itself with methods suddenly not existing anymore.

I also noticed that mw.site.currentVersion exists. Would it be okay if we make no particular compatibility promises at all (though of course we don’t have to be aggressively obstructive towards on-wiki Lua either), and in case of incompatible changes between train versions, the on-wiki modules do something like this?

if mw.site.currentVersion:find( '-wmf.12 ' ) then
    sense:someMethod()
else
    sense:otherMethod()
fi

I’m happy to include euwiktionary or other wikis in the first set, as long as I have confirmation that the wiki editors are aware the Lua interface isn’t stable yet, and there might be breaking changes.

There's only one editor, not very active, and happy about the opportunity. The other editor will be me!

Hi @Mahir256 and @Theklan, we're ready to deploy the first version of Lua access to Lexemes on Bengali and Basque Wiktionaries, and I'll make an announcement on both of these wikis today :)
Thanks for your support (and your patience) and we're looking forward to hear your feedback, bug reports, and to see what you will be able to do with this feature!

yay! Would it have any clue on how to use it?

@Theklan Absolutely, you can find the full list of available commands on https://www.mediawiki.org/wiki/Extension:WikibaseLexeme/Lua and an example on https://en.wiktionary.beta.wmflabs.org/wiki/cat

If you have any question on how to use it, or want to share your experiment with others, feel free to ask here :)

Change 746928 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[operations/mediawiki-config@master] Enable Lexeme Lua access on first four wikis

https://gerrit.wikimedia.org/r/746928

Change 746930 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[operations/mediawiki-config@master] Set wgLexemeEnableDataTransclusion to false everywhere

https://gerrit.wikimedia.org/r/746930

Change 746930 merged by jenkins-bot:

[operations/mediawiki-config@master] Set wgLexemeEnableDataTransclusion to false everywhere

https://gerrit.wikimedia.org/r/746930

Mentioned in SAL (#wikimedia-operations) [2021-12-14T12:07:28Z] <lucaswerkmeister-wmde@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:746930|Set wgLexemeEnableDataTransclusion to false everywhere (T294159)]] (no-op) (duration: 00m 59s)

Change 746928 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable Lexeme Lua access on first four wikis

https://gerrit.wikimedia.org/r/746928

Mentioned in SAL (#wikimedia-operations) [2021-12-15T12:36:13Z] <lucaswerkmeister-wmde@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:746928|Enable Lexeme Lua access on first four wikis (T294159)]] happy holidays :) (duration: 01m 06s)

Question: how difficult would it be (or is it even possible) to enable the feature on Lingua Libre (an external Mediawiki/Wikibase install outside of the Wikimedia projects)?

Question: how difficult would it be (or is it even possible) to enable the feature on Lingua Libre (an external Mediawiki/Wikibase install outside of the Wikimedia projects)?

Do they want Lua access to the Lexeme data on Wikidata or the data in their own Wikibase instance?

Hello! I'm trying to work with this, but it isn't as simple as thought.

First of all, I have created a module copying the one in beta:

Luanda errorea in Modulu:wdl-izena at line 5:attempt to index local 'lexeme' (a nil value)

You can see it at: https://eu.wiktionary.org/w/index.php?title=Lankide:Theklan/Proba_orria&oldid=408206.

I would need some help figuring out how to get the forms and senses of the lexemes. Would it be possible?

You’re calling the module function with a single argument ({{#invoke:wdl-izena|singular|L73194}}singular is the function name, so L73194 is the only argument), but accessing the second argument in the module (return singularPlural( frame.args[2], 'Q110786', 'Q332734' ), specifically frame.args[2]). That can’t work. (Also, you’re calling singularPlural with three arguments, but the function declaration only has two arguments, so the 'Q332734' gets ignored too.)

Totally lost. I don't know how to LUA.

Restricted Application added a subscriber: Stang. · View Herald Transcript

This should now be enabled everywhere.
{F35260331}