Wikifunctions increasingly uses Wikidata lexeme senses as inputs in community-contributed functions. However, there is currently no dedicated user interface for selecting lexeme senses, making it difficult and error-prone for users to enter them manually (e.g., L123-S2).
A dedicated UI component would provide significant improvements in usability, clarity, and consistency — similar to how lexeme form selection already works in Z6824.
Currently, direct API-based search for lexeme senses (the same way we do now for Lexeme forms) is limited or non-functional (e.g., wbsearchentities with type=sense returns no results, even though documented). This technical constraint affects what kind of interaction model is feasible.
Design Goal
Create a user-friendly component for selecting a Wikidata lexeme sense, suitable for use in the frontend.
The solution should:
- Allow users to find and select a valid lexeme sense
- Work within current Wikidata API limitations
- Fit into the editing workflow for ZObjects
- Degrade gracefully if sense (metadata) is missing or malformed
- It might be relevant to check if the selection for Lexeme Forms also needs revisiting?
Design Considerations
- Edge cases
- lexeme does not have senses
- long or verbose sense texts
- Identical or Very Similar Sense Descriptions.
- Lexeme Has Many Senses (10/20+) (dont know if thats happening)
Two-step model (suggested, but not required)
A possible UX pattern is to have users:
- Search/select a lexeme first (via API wbsearchentities)
- Then choose a sense from the selected lexeme (via API wbgetentities)
This would bypass the need to directly search across all senses and aligns with current API support.
Example Flow:
| Search Lexeme | Selected Lexeme | Select Lexeme sense | Selected Lexeme sense |
Deliverables
- One or more proposed UX flows for lexeme sense selection
- Wireframes or Design of:
- Initial input state (no selection)
- Sense selection flow
- Collapsed and expanded display states when editing (https://www.wikifunctions.org/view/en/Z6806)
- Collapsed and expanded display states when reading ( https://www.wikifunctions.org/view/en/Z23538 )
- Design notes or rationale for the selected approach
- Error/degraded states (e.g., no glosses/senses)
Technical Constraints (for reference)
- wbsearchentities with type=sense does not return results, so a direct search for lexeme senses might/will not be possible.
- Sense glosses are often missing or incomplete
- Sense selection is based on lexeme sense IDs, e.g., L456-S1
- Glosses are language-specific and may require language context in the UI
Examples
Lexeme Form
A form is a specific inflection or variation of the lexeme based on grammatical features such as tense, number, gender, etc.
Forms are stored under the lexeme and identified as F-number, like L279-F1.
Each form has:
- A spelling
- Grammatical features (like plural, past tense, etc.)
🔹 Example:
Lexeme: run (English, verb)
- Form 1 (L279-F2): "runs" (third-person singular present)
- Form 2 (L279-F3): "ran" (simple past)
- Form 3 (L279-F4): "running" (present participle)
Lexeme Sense
A sense represents a meaning or definition of the lexeme. Lexemes can have multiple senses, each describing a different usage or interpretation.
Senses are identified as S-number, like L123-S1.
Each sense has:
- A gloss (definition in natural language)
- Optional links to Wikidata items (semantic equivalents)
🔹 Example:
Lexeme: bank (English, noun) (
Proposed design
| Default view | 1. Lexeme selection | 2. lexeme sense |
| You have 2 input fields. One for Lexeme selection and the second for lexeme sense selection which is disabled by default and it is enabled when a lexeme is selected | You first select the lexeme | Select the lexeme sense |
| If a lexeme has no senses the dropdown remains disabled and a message is shown informing the use of this with a link to the lexeme as a CTA | ||
Edge cases
Lexeme Gloss language:
We show the lexeme senses gloss in the selected language of the page.
If a lexeme sense does not have a gloss in the page language we follow this fallback:
- Gloss in language of page
- Statement of the sense in language of the page (label: item description)
- Gloss in another available language
long or verbose sense texts:
Display it in full.
If a long sense is selected the dropdown is truncated to 1 line
Identical or Very Similar Sense Descriptions:We would show them
Lexeme Has Many Senses (10/20+) : We would show them
View mode
For view mode would display Lexeme senses like this:
Lemma: Sense gloss in the language of the page (following the same fallbacks as above)




















