Summary
When a user searches in a non-Latin script (e.g. Devanagari, Bengali, Arabic) in the article guidance topic matching step, they get zero results if the searched item has no Wikidata label in their language, even when the item exists and is widely covered in English. This blocks editors from discovering subjects whose Wikidata coverage is English-only.
This was first identified on the Hindi test instance and has since been confirmed for Bengali and Arabic. The issue affects the ability to activate the article guidance experiment in these languages.
Constraints by language
This is not a uniform problem across non-Latin scripts:
- Devanagari and Bengali use Brahmic abugida scripts, where vowel information is fully encoded in the written text. Transliteration-based approaches are more viable for these languages.
- Arabic is an abjad, short vowels are not written in standard text. For example, فيروز ("Fairuz") transliterates to "fyrwz" with vowels absent entirely, making transliteration-based matching unreliable for Arabic.
Agreed approach
After exploring several options (see discussion below), the team has aligned on the following:
- MT via MinT (real-time): translate the user's query via MinT to generate a candidate English label, then match against Wikidata. This is the primary solution being implemented in this task.
- Fuzzy matching on Wikidata: should be explored in parallel as a potential configuration change. See discussion with @dcausse.
Scope
This task covers:
Connecting to MinT to translate non-Latin script queries from article guidance search box (whether they come from red link or user-input) in real time and use the translation into English to retrieve Wikidata matches for languages where labels are missing.
Considering that we first should check if the inputed text has a wikidata label result or not, and if it does not, it should trigger the translation.
Instrumentation of this is needed and documented here: T432142
A separate task covers the UX side: T431532 Improve loading state message while Wikidata results are loading
Out of scope
- Pre-translated Wikidata label dataset (higher effort, set aside for now)
- Transliteration library approach (viable for Devanagari/Bengali but insufficient for Arabic; may be revisited)
QA plan
Test on testwiki before enabling on production.
Functional tests
- Search for a globally notable subject in Devanagari (Hindi) where the Wikidata item has no Devanagari label. Confirm MinT fallback triggers and returns a match. Example: महात्मा गांधी → Mahatma Gandhi
- Search for a globally notable subject in Bengali where the Wikidata item has no Bengali label. Confirm MinT fallback triggers and returns a match.
Example: ওমর আর্তান → Omar Abdulkadir Artan
- Search for a globally notable subject in Arabic where the Wikidata item has no Arabic label. Confirm MinT fallback triggers and returns a match.
Example: فيروز → Fairuz
- Search for a subject that has a Wikidata label in the user's language. Confirm MinT fallback does NOT trigger and standard Wikidata lookup is used.
- Search for a subject that does not exist in Wikidata, confirm the no-results state is handled gracefully and does not produce an error.
Edge cases
- Search in a language not supported by MinT. Confirm the case is handled gracefully (no error, appropriate no-results state shown).
- Search using a red link as input. Confirm the fallback triggers correctly for red link-originated queries as well as user-typed input.
Guardrails
