-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deal with 'o', double 'u' #3
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мені здавалося, задум Дмитра був залишити — як один із варіантів — транслітерацію вікшинарі без будь-яких змін. Принаймні це зараз записано в коментарі зверху файла.
Будуть опція оригінальної транслітерації і така. Я внесу відповідні зміни в
код, щоб підтримувати декілька.
…On Thu, May 12, 2022 at 4:37 PM Danylo Mysak ***@***.***> wrote:
***@***.**** commented on this pull request.
Мені здавалося, задум Дмитра був залишити — як один із варіантів —
транслітерацію вікшинарі без будь-яких змін. Принаймні це зараз записано в
коментарі зверху файла.
—
Reply to this email directly, view it on GitHub
<#3 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABAA4U5YD62PN3DBZ3BAYDVJUCRDANCNFSM5VYGWHGQ>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
@danmysak @dchaplinsky я тут не вношу зміни до транслітерації, а виправляю помилку цієї ж транслітерації, яка тут задумана 🤔 просто навіть за транслітерацією вікшинарі 'o' не може весь час транскрибуватись як ненаголошена 💁 |
# unstressed /u/ has an allophone [ʊ] | ||
phonetic = re.sub(r"([^ˈ])u", r"\1ʊ", phonetic) | ||
phonetic = re.sub(r"^u", r"ʊ", phonetic) | ||
# unstressed /ɔ/ has a stressed allophone [o] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I believe the comment should say stressed /ɔ/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah, you're right
@@ -153,7 +155,7 @@ def ipa(text: str, check_accent: bool) -> str: | |||
# including stress mark for single-syllable words if check_accent is set to true | |||
number_of_vowels = len(re.findall(r"[ɑɛiɪuɔ]", phonetic)) | |||
if number_of_vowels == 1 and check_accent: | |||
phonetic = re.sub(r"([ɑɛiɪuɔ])", r"ˈ\1", phonetic) | |||
phonetic = re.sub(r"([ɑɛiɪuo])", r"ˈ\1", phonetic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two lines above we are counting vowels and using this list of characters: ɑɛiɪuɔ
And here we are using o instead of ɔ. As far as I can understand from the code, there is no chance, that the word at this point of the processing will have any o's, as they are unconditionally replaced with ɔ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to rewrite this. We need to add 'o' to the 'number_of_vowels' because otherwise stressing of 'o's works pretty randomly.
Дублюю пояснення тут:
щодо голосних мій головний concern зараз в тому, що наголошені і ненаголошені “o” позначаються однаково - знаком [ɔ]:
при́пхнутого -> ˈprɪpxnʊtɔɦɔ
поверхово́див -> pɔu̯erxɔˈu̯ɔdeu̯
електро́нні -> eleˈktrɔnʲːi
а́еродром -> ˈɑerɔdrɔm
а в вікіпедії взагалі написано що ɔ це знак наголошеного “о”, що типу взагалі протилежне тому що в коді пишуть в коментарях, тому я думаю що в вікі помилка просто на цій сторінці https://uk.wikipedia.org/wiki/%D0%94%D0%BE%D0%B2%D1%96%D0%B4%D0%BA%D0%B0:%D0%9C%D0%A4%D0%90/%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D1%81%D1%8C%D0%BA%D0%B0
тому що якщо зайти на сторінку звука ɔ, то там написано “Один з основних звуків української мови. Має наголошений алофон — звук [o̞] (поїзд)” https://uk.wikipedia.org/wiki/%D0%9E%D0%B3%D1%83%D0%B1%D0%BB%D0%B5%D0%BD%D0%B8%D0%B9_%D0%B3%D0%BE%D0%BB%D0%BE%D1%81%D0%BD%D0%B8%D0%B9_%D0%B7%D0%B0%D0%B4%D0%BD%D1%8C%D0%BE%D0%B3%D0%BE_%D1%80%D1%8F%D0%B4%D1%83_%D0%BD%D0%B8%D0%B7%D1%8C%D0%BA%D0%BE%D1%81%D0%B5%D1%80%D0%B5%D0%B4%D0%BD%D1%8C%D0%BE%D0%B3%D0%BE_%D0%BF%D1%96%D0%B4%D0%BD%D1%8F%D1%82%D1%82%D1%8F
тобто цей самий звук - це позначка ненаголошеного “o”
також вирішила виправити те як транскрибується 'вакуум' :)