Add name_native_language to People: Author, Translator, Editor so that they can be added to the search functionality.
Check for Property 1559 with the language of the book, if it doesn't exist, we need to get it from the Wikidata label.
Add name_native_language to People: Author, Translator, Editor so that they can be added to the search functionality.
Check for Property 1559 with the language of the book, if it doesn't exist, we need to get it from the Wikidata label.
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | LGoto | T436035 Projects and mentors for Wikimedia Outreachy Round 33 | |||
| Open | None | T436628 Outreachy 33: Improve the Wikisource Reader Android App and API | |||
| Open | Feature | RCodes | T430705 Add name_native_language to People |
Hi @Saiphani02, @Bodhisattwa, @Muguro can I work on this task for my Outreachy contribution?
Please wait for some time until the review of your PRs are done by @Saiphani02 and @Muguro
Hi @Bodhisattwa , @Saiphani02, @Muguro
While testing WSIndex I noticed something that's related to this task. I checked the existing Tool-wsindex tasks and couldn't find it reported, so I'm sharing it here.
At the moment the catalog import only saves authors who have an English name on Wikidata. The author part of the query in updatecatalog.py has FILTER(LANG(?authorLabel) = "en"), so an author who only has a name in their own language is skipped.
For example, the Tamil book Q100887340 (பாப்பா முதல் பாட்டி வரை) has an author on Wikidata, Q16310659 (த. கோவேந்தன்), but the author has no English name. On the live API, https://wsindex.toolforge.org/books/Q100887340/ shows "authors": []. I compared 12 Tamil books on the live API: the 6 whose authors have an English name all show their author, and the 6 whose authors don't all show an empty list. Out of 83 authors of Tamil Wikisource books I checked, at least 13 are missing for this reason.
This affects this task too: we can only add name_native_language to people who are in the database, and these authors never get added. So it might be good to fix this first, or as part of this task, for example by using the mul label or the name in the book's language when there's no English one.
I'm not working on it, just wanted to note it here so it doesn't get lost.
Hi @RCodes Feel free to work on this task. We didn't want to have empty author names. You can now check for name in English and name in native language and create the author if either of them exists.
Hi @Saiphani02 @Muguro, here's how I'm planning to do this. Let me know if you'd like anything done differently:
One thing I wasn't sure about: one person can appear in books of different languages (e.g. Tolstoy in Russian and Bengali), but there's only one name_native_language, so it would end up as the language of whichever book was imported last. Is that okay, or would you prefer the person's own native name (P1559 in any language)?
rabuma opened https://gitlab.wikimedia.org/toolforge-repos/wsindex/-/merge_requests/7
Save people's names in their native language (T430705)
Hi @Saiphani02 @Muguro, I've opened a merge request for this: https://gitlab.wikimedia.org/toolforge-repos/wsindex/-/merge_requests/7
It follows the plan above. People are now saved if they have an English or a native name, name_native_language comes from P1559 or the label in the book's language, and search also matches authors' native names. I added before/after screenshots in the MR.
The question about which language to use for people with books in several languages is still open, so I've noted it in the MR too. Happy to change it if you prefer something else. Thanks!