Ukrainian (and Russian) templates continued

Post your questions & get help from friendly LibriVoxers
Kazbek
LibriVox Admin Team
Posts: 6525
Joined: April 24th, 2019, 12:06 pm

Post by Kazbek »

This thread is for the promised phase 2 of creating the Ukrainian project generator template. The actual work on the template is not done by me. I'm just here to facilitate the discussion. The Ukrainian template is up and running (hurray!), but there's an issue with some of the phrasing, both in Ukrainian and Russian. The issue is that our standard form "section/chapter # of [title] by [author]" doesn't work grammatically in either of those languages, and no one would actually use the formulation we have in those templates now ("автора [имя]"). Why, you may ask, do we have a problem for Russian and Ukrainian? It's because these languages have no equivalents of those prepositions "of" and "by", which sets them apart from the other European languages in our templates. The closest translation would be to use a certain inflection of the title and author's name called the genitive case, but this can sound more or less awkward, depending on the specific case. In practice, every soloist and BC has been using their own variation. Some of the most common can be rendered in English as (with the hyphens meaning it-is-a-single-word):

section/chapter # of-the-book/novel/etc [title] [author's name in genitive case].
section/chapter # [title in genitive case] [author's name in genitive case].
[author's name], [title], section/chapter #.
[title], section/chapter #. Composition-by [author's name].

I would not try to come up with a single Russian and Ukrainian formulation and force everyone to adopt it, but I think it would be nice to have something realistic in the template. Our Ukrainian team agreed on a version with detailed instructions, but the system was unhappy with it for some reason I haven't looked into. The minimal change I would propose myself for Russian is to replace "автора %s" with "%s [в род. падеже]" (meaning "%s [in the genitive case]" with the variable %s being substituted by the author's name). I believe this is also the form favored in practice by the person who helpfully translated the template into Russian. If the system is unhappy even with this simple change, I can help to look into why it is so. If it does work, perhaps the Ukrainian team would like to try again the more elaborate instructions they had agreed on. The template fields this change would affect are:

project_launch_template_title_author
project_launch_template_title_author_read_by
project_launch_template_section_of_first
project_launch_template_section_of_second
project_launch_template_end_of_title
project_launch_template_act_of

Thoughts?

Michael
TriciaG
LibriVox Admin Team
Posts: 60808
Joined: June 15th, 2008, 10:30 pm
Location: Toronto, ON (but Minnesotan to age 32)

Post by TriciaG »

I'll re-read this and try to digest it a bit later today.

The programmer was concerned that the framework would not like the language missing the %s like all the other languages have, that it might spit out error messages because of it missing.

The translations certainly don't have to be word for word, and can fit each language. But I guess it also needs to fit within the programming framework. So yeah, input on this is appreciated. :)
School fiction: David Blaize
America Exploration: The First Four Voyages of Amerigo Vespucci
Serial novel: The Wandering Jew
Medieval England meets Civil War Americans: Centuries Apart
ShiNeko
Posts: 2504
Joined: June 5th, 2013, 9:35 am
Location: Pearl near the Sea

Post by ShiNeko »

TriciaG wrote: January 4th, 2022, 6:27 am I'll re-read this and try to digest it a bit later today.

The programmer was concerned that the framework would not like the language missing the %s like all the other languages have, that it might spit out error messages because of it missing.

The translations certainly don't have to be word for word, and can fit each language. But I guess it also needs to fit within the programming framework. So yeah, input on this is appreciated. :)
Hello, Tricia! I was sure we didn’t change the framework. But maybe we accidentally deleted something. I'll look through these lines to check.
~Anastasiia
Multilingual Monthly Poem like Weekly Poetry but for all languages🗺
Сборник рассказов Л. Андреева
"Кобзар" Шевченко several short roles: "Гайдамаки", "Великий льох" 🎭
ShiNeko
Posts: 2504
Joined: June 5th, 2013, 9:35 am
Location: Pearl near the Sea

Post by ShiNeko »

Kazbek wrote: January 3rd, 2022, 9:24 pm The minimal change I would propose myself for Russian is to replace "автора %s" with "%s [в род. падеже]" (meaning "%s [in the genitive case]" with the variable %s being substituted by the author's name).
If I remember correctly we had it this way but in much longer form (asking BC to delete the text in brackets after correcting the author's name). If this form works, can the length be the cause then?
~Anastasiia
Multilingual Monthly Poem like Weekly Poetry but for all languages🗺
Сборник рассказов Л. Андреева
"Кобзар" Шевченко several short roles: "Гайдамаки", "Великий льох" 🎭
HannaPonomarenko
Posts: 1660
Joined: May 25th, 2020, 1:44 pm

Post by HannaPonomarenko »

ShiNeko wrote: January 4th, 2022, 8:08 am
Kazbek wrote: January 3rd, 2022, 9:24 pm The minimal change I would propose myself for Russian is to replace "автора %s" with "%s [в род. падеже]" (meaning "%s [in the genitive case]" with the variable %s being substituted by the author's name).
If I remember correctly we had it this way but in much longer form (asking BC to delete the text in brackets after correcting the author's name).
Yes, you remember correctly. I have downloaded the form approved by Ukr team before changing it.
TriciaG
LibriVox Admin Team
Posts: 60808
Joined: June 15th, 2008, 10:30 pm
Location: Toronto, ON (but Minnesotan to age 32)

Post by TriciaG »

It can be as long as it needs to be. I think we questioned it because it was so much longer, not realizing how different the language is from other, Latin-based and Germanic languages. And plugging it into Google Translate didn't help. "The name in genitive case? What the heck is that, and why does a specific form of grammar need to be specified?" :roll:

Please excuse our ignorance. :)
School fiction: David Blaize
America Exploration: The First Four Voyages of Amerigo Vespucci
Serial novel: The Wandering Jew
Medieval England meets Civil War Americans: Centuries Apart
sacapsie
Posts: 96
Joined: July 25th, 2014, 11:17 am

Post by sacapsie »

TriciaG wrote: January 4th, 2022, 9:19 am It can be as long as it needs to be. I think we questioned it because it was so much longer, not realizing how different the language is from other, Latin-based and Germanic languages. And plugging it into Google Translate didn't help. "The name in genitive case? What the heck is that, and why does a specific form of grammar need to be specified?" :roll:

Please excuse our ignorance. :)
Heh, the problem here is that in Germanic and Romance languages, possession/authorship is indicated without changing the form of the author's name, with a preposition. [ETA pedantic self-correction: or a clitic, as in Jane Austen's Emma] Something like "blah blah di Author's Name". In Russian and Ukrainian, you would most naturally modify the author's name, and it sometimes becomes a different string. The programmatic stuff above relies on string interpolation, where "%s" is a variable replaced by a fixed, immutable string. That won't work for Russian. Compare:

Lev Tolstoy [did stuff] versus:
A novel (by) Lva Tolsova

In the latter case, the name "Lev Tolstoy" appears in the genitive case, and it is not a context where you could just plug in "Lev Tolstoy" by the sort of programmatic manipulation that works in Western European languages.

If I may make a humble suggestion--I think the most compact and easiest to handle template for Slavic lgs would be something like:

Lev Tolstoy, Anna Karenina. Chapter X

I know readers vary in how they do this, but to me, it solves the programming issue with string interpolation and also makes it easier for the reader, so you don't have to worry about declining the name. It's usually going to be shorter, too.
TriciaG
LibriVox Admin Team
Posts: 60808
Joined: June 15th, 2008, 10:30 pm
Location: Toronto, ON (but Minnesotan to age 32)

Post by TriciaG »

I spoke with the master programmer on our lunch walk today. :lol:

The programming challenge here, is that the %s indicators (where "strings" are inserted) must all be in the same order for all languages, within each field of text (each cell in the spreadsheet). There is no programming option to indicate "this one first, this one second in most cases, but in this other language, flip them around." So if all other languages have Title first, then Author, then so do the Russian and Ukrainian templates.

Working within that constraint, what would be the best option?

Note: Do keep in mind that while the template will return text in a certain way, the soloist or BC can always go in and modify it. It isn't ideal, because newer members may not realize that. But as the Master Programmer said (or something similar), it's nearly impossible to fully globalize automated things like this to 100% satisfy all languages. :?
School fiction: David Blaize
America Exploration: The First Four Voyages of Amerigo Vespucci
Serial novel: The Wandering Jew
Medieval England meets Civil War Americans: Centuries Apart
HannaPonomarenko
Posts: 1660
Joined: May 25th, 2020, 1:44 pm

Post by HannaPonomarenko »

sacapsie wrote: January 4th, 2022, 2:57 pm

If I may make a humble suggestion--I think the most compact and easiest to handle template for Slavic lgs would be something like:

Lev Tolstoy, Anna Karenina. Chapter X

I know readers vary in how they do this, but to me, it solves the programming issue with string interpolation and also makes it easier for the reader, so you don't have to worry about declining the name. It's usually going to be shorter, too.
Great explanation, sacapsie :clap:
As for your humble suggestion. It sounds very natural for a Russian-speaking person, but, unfortunately, in case of a long athor's name and/or title and/or translator's name it becomes hard for a listener to get to the Chapter's number. That's essential for an audiobook, I guess.

Thank you
HannaPonomarenko
Posts: 1660
Joined: May 25th, 2020, 1:44 pm

Post by HannaPonomarenko »

Kazbek wrote: January 3rd, 2022, 9:24 pm
section/chapter # of-the-book/novel/etc [title] [author's name in genitive case].
section/chapter # [title in genitive case] [author's name in genitive case].
[author's name], [title], section/chapter #.
[title], section/chapter #. Composition-by [author's name].
According to Master Programmer it seems first two options are acceptable.

Let's take Lev Tolstoy. Apart from Anna Karenina he also wrote «В чём моя вера?» and a play "Власть тьмы". Variant 2 in this cases should sound like:

section/chapter # [title in genitive case] [author's name in genitive case] = Секция/глава # «В чём моя вера?» Льва Толстого. Genitive case doesn't work for this type of title.

section/chapter # [title in genitive case] [author's name in genitive case] = Секция/глава # «Власти тьмы» Льва Толстого.

Both examples sound strange to me. So using method of excluding the first is the best for me personnaly. We also have chosen it for Ukr template initially.
ShiNeko
Posts: 2504
Joined: June 5th, 2013, 9:35 am
Location: Pearl near the Sea

Post by ShiNeko »

TriciaG wrote: January 4th, 2022, 3:07 pm I spoke with the master programmer on our lunch walk today. :lol:

The programming challenge here, is that the %s indicators (where "strings" are inserted) must all be in the same order for all languages, within each field of text (each cell in the spreadsheet). There is no programming option to indicate "this one first, this one second in most cases, but in this other language, flip them around." So if all other languages have Title first, then Author, then so do the Russian and Ukrainian templates.

Working within that constraint, what would be the best option?

Note: Do keep in mind that while the template will return text in a certain way, the soloist or BC can always go in and modify it. It isn't ideal, because newer members may not realize that. But as the Master Programmer said (or something similar), it's nearly impossible to fully globalize automated things like this to 100% satisfy all languages. :?
I think it is better to make an instruction in the template for BC to correct author's name, title etc. (how we did with ukr version, if it works as it originally was written) and then to delete the instruction. It takes time but for these languages (and other Slavic languages) it is inevitable, and either way it needs corrections as it is right now too.
~Anastasiia
Multilingual Monthly Poem like Weekly Poetry but for all languages🗺
Сборник рассказов Л. Андреева
"Кобзар" Шевченко several short roles: "Гайдамаки", "Великий льох" 🎭
sacapsie
Posts: 96
Joined: July 25th, 2014, 11:17 am

Post by sacapsie »

TriciaG wrote: January 4th, 2022, 3:07 pm I spoke with the master programmer on our lunch walk today. :lol:

The programming challenge here, is that the %s indicators (where "strings" are inserted) must all be in the same order for all languages, within each field of text (each cell in the spreadsheet). There is no programming option to indicate "this one first, this one second in most cases, but in this other language, flip them around."
Hmm, right, that could be a limitation depending on the programming language this is done in. (But it depends... most lgs allow you to use %s string interpolation, but some have additional, less rigid options. For example, in more versions of Python starting with 3.6 and newer, the f-string literals would allow you to rewrite this very easily using named variables. That might be totally irrelevant here, of course.)
So if all other languages have Title first, then Author, then so do the Russian and Ukrainian templates.

Working within that constraint, what would be the best option?

Note: Do keep in mind that while the template will return text in a certain way, the soloist or BC can always go in and modify it. It isn't ideal, because newer members may not realize that. But as the Master Programmer said (or something similar), it's nearly impossible to fully globalize automated things like this to 100% satisfy all languages. :?
I just went to a bunch of non-Librivox sources of Russian audiobooks and spot-checked, and they all do Author, Title (Author in the nominative, as it happens). So it's a bit non-standard to use the order "Chapter X, Anna Karenina, Lev Tolstoy", but on the other hand, I doubt most Slavic listeners' brains would break if they heard that. Do you Slavs agree? If I heard "Глава пятая, Анна Каренина. Лев Николаевич Толстой", I don't think I'd be outraged by that.
Kazbek
LibriVox Admin Team
Posts: 6525
Joined: April 24th, 2019, 12:06 pm

Post by Kazbek »

sacapsie wrote: January 4th, 2022, 5:10 pm If I heard "Глава пятая, Анна Каренина. Лев Николаевич Толстой", I don't think I'd be outraged by that.
I don't think anyone would be outraged by that. Our listeners reserve their outrage for the occasional mispronounced word. :) However, I don't believe that any of our BCs has actually used this form, while some do use the first variant on my list above:

section/chapter # of-the-book/novel/etc [title] [author's name in genitive case]
In this case: Глава пятая романа "Анна Каренина" Льва Николаевича Толстого

I would recommend keeping the template closer to some common example from actual practice. The template already has the word "книги" (of-the-book), which the BCs change to whatever genre is appropriate, or to some other formulation according to their taste.

M.
ChristopherW
Posts: 34
Joined: August 4th, 2009, 1:29 pm

Post by ChristopherW »

TriciaG wrote: January 4th, 2022, 3:07 pm The programming challenge here, is that the %s indicators (where "strings" are inserted) must all be in the same order for all languages, within each field of text (each cell in the spreadsheet). There is no programming option to indicate "this one first, this one second in most cases, but in this other language, flip them around." So if all other languages have Title first, then Author, then so do the Russian and Ukrainian templates.
In languages that use C's style of "printf" format strings (including PHP, which I'm assuming LibriVox uses), format specifiers can be given an argument position by inserting "n$" between "%" and "s", where "n" is the argument position number. For example, a format string like "%2$s %1$s" will print the second string followed by the first string. Perhaps something like that will work in the LibriVox template system?
HannaPonomarenko
Posts: 1660
Joined: May 25th, 2020, 1:44 pm

Post by HannaPonomarenko »

Tricia, should we try to modify Ukr (and Rus) template once more basing on the variant

section/chapter # of-the-book/novel/etc [title] [author's name in genitive case]

?
Post Reply