Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Быстрое решение проблем с ударениями - russtress #58

Closed
vasia123 opened this issue Mar 30, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@vasia123
Copy link

Есть такой пакет - https://github.com/MashaPo/russtress - он тем и занимается, что проставляет ударения. Вот пример кода для расстановки ударений и преобразования ' в +

import re, russtress
accent = russtress.Accent()
input_text = "Проставь, пожалуйста, ударения"
accented_text = accent.put_stress(input_text)
output_text = re.compile(r"(.)\'", re.UNICODE).sub(r"+\1", accented_text)
print(output_text)  # "Прост+авь, пож+алуйста, удар+ения"

Может кому сэкономит время.

@vasia123 vasia123 added the enhancement New feature or request label Mar 30, 2021
@snakers4
Copy link
Owner

Тут внутри сетка на TF
Но автор вроде поделился валидацией
Будет полезно
Спасибо!

Repository owner locked and limited conversation to collaborators Mar 31, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants