Page MenuHomePhabricator

Retrieve & instantiate lexemes and lexeme forms from Wikidata
Closed, ResolvedPublic

Description

Description

Implement built-in functions which, given a Wikidata entity ID for a lexeme or lexeme form, retrieve that entity from Wikidata as a JSON string and use the content to instantiate an instance of the corresponding Wikifunctions type.

The corresponding Wikifunctions types have been merged by this merge request.

Retrieval and instantiation of the following Wikidata types will be done within lexemes and lexeme forms, to the extent they are needed to instantiate lexemes and lexeme forms for initial NLG use cases: Item, Statement, Property, Lexeme sense. However, separate retrieval functions for those 4 types are out of scope for this ticket.

Some Wikidata API details and recommendations are given in T368654.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • Performance should be reasonably optimized.
  • Errors should be handled and returned appropriately.

Completion checklist

Event Timeline

DMartin-WMF updated the task description. (Show Details)
DMartin-WMF updated the task description. (Show Details)
DMartin-WMF renamed this task from Implement retrieval of a Lexeme from Wikidata to Retrieve & instantiate entities from Wikidata.Aug 14 2024, 5:48 PM
DMartin-WMF updated the task description. (Show Details)

Change #1070276 had a related patch set uploaded (by David Martin; author: David Martin):

[mediawiki/extensions/WikiLambda@master] Add WIKIDATA_API_URL to docker-compose.sample.yml

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

Change #1070276 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add WIKIDATA_API_URL to docker-compose.sample.yml

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

apine merged https://gitlab.wikimedia.org/repos/abstract-wiki/wikifunctions/function-orchestrator/-/merge_requests/207

Implement built-ins to fetch lexeme/lexeme form from Wikidata & instantiate as Z6005/Z6004

Moving back to "in progress" because of new info that we need to fetch from Wikidata via the service mesh, rather than directly calling their Linked Data API.

DMartin-WMF renamed this task from Retrieve & instantiate entities from Wikidata to Retrieve & instantiate lexemes and lexeme forms from Wikidata.Sep 23 2024, 7:18 AM
DMartin-WMF updated the task description. (Show Details)

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

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-08-13-135124 to 2024-09-24-145528

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

Change #1075554 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade orchestrator from 2024-08-13-135124 to 2024-09-24-145528

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

Everything underneath this is now deployed except enabling in production, which I believe is planned for two weeks' time alongside T372612.

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

[operations/deployment-charts@master] wikifunctions: Enable Wikidata dereferencing

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

Change #1078951 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Enable Wikidata dereferencing

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