Page MenuHomePhabricator

Provide a built-in function to find lexemes related to a given Wikidata lexeme sense
Closed, ResolvedPublic

Description

Description

Provide a new pre-defined & built-in function that returns (if available) a list of Wikidata lexeme references based on 3 inputs, having these types: Wikidata lexeme sense reference, Wikidata property reference, and Natural language. The function can employ the search API augmented and discussed in T378097, to retrieve entities related to the given entity references. Then it needs to filter down to the lexemes, and filter the lexemes by the given Natural language. It's possible that filtering by Language might soon be supported by the search step; see T271776.

This is motivated by querying over the property pertainym of. This can be modeled after, and reuse code for, T383631.

Example call to the search API.

  • Declare the function in function-schemata
  • Declare the implementation in function-schemata
  • Write the implementation code in the orchestrator
  • Provide CI tests

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

  • The new function should return quickly without timeouts, noticeable delays, or other performance problems.

Completion checklist

Event Timeline

Jdforrester-WMF renamed this task from Built-in function to find lexemes related to a given Wikidata lexeme sense to Provide a pre-defined & built-in function to find lexemes related to a given Wikidata lexeme sense.Feb 26 2025, 5:35 PM
Jdforrester-WMF triaged this task as High priority.
DMartin-WMF renamed this task from Provide a pre-defined & built-in function to find lexemes related to a given Wikidata lexeme sense to Provide a built-in function to find lexemes related to a given Wikidata lexeme sense.Feb 27 2025, 5:14 AM

jforrester merged https://gitlab.wikimedia.org/repos/abstract-wiki/wikifunctions/function-schemata/-/merge_requests/196

definitions: Add Z6831/Find lexemes for Wikidata lexeme sense and its built-in Z6931

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

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (a6def55)

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

Change #1125186 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (a6def55)

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

I did the function-schemata part of this, but a couple higher priorities have come up, so leaving this in backlog for now. Also, the function-schemata definitions might need to be modified after T388086 is done.

DMartin-WMF changed the task status from Open to In Progress.Mar 12 2025, 4:40 AM
DMartin-WMF updated the task description. (Show Details)

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

[operations/deployment-charts@master] wikifunctions: Update evaluators from 2025-03-05-140259 to 2025-03-11-234147

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

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

[operations/deployment-charts@master] wikifunctions: Update orchestrator from 2025-03-05-140247 to 2025-03-11-234105

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

Change #1126995 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Update evaluators from 2025-03-05-140259 to 2025-03-11-234147

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

Change #1126996 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Update orchestrator from 2025-03-05-140247 to 2025-03-11-234105

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

I've confirmed that this new function, Z6831, can successfully be called via the orchestrator API, but it's not showing up yet on Wikifunctions.org, so I will hold off on sign off. I'll Check again after the next run of loadPreDefinedObject.php on production.

It's showing up now & behaving as expected. Resolving.