Модель предсказания ударения для русских слов

Файлы модели и словари автоматически скачиваются из этого репозитория кодом проекта https://github.com/Koziev/StressModel.

Модель используется в проекте русской генеративной поэзии.

Пример использования:

import stress_model

def render(word):
    px = accentuator.predict2(word)
    print(' | '.join(accentuator.render_stress(word, pos) for pos in px))


if __name__ == '__main__':
    accentuator = stress_model.AccentuatorWrapperWithDictionary()
    render('моя')
    render('насыпать')
    render('кошка')
    render('ничегошеньки')

Этот код выдаст следующее:

мо́я | моя́
насы́пать | насыпа́ть
ко́шка
ничего́шеньки
Downloads last month
23
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no pipeline_tag.