Giter Site home page Giter Site logo

stressmodel's Introduction

Нейросетевая модель для предсказания положения ударения в руских словах

Модель предназначена для определения позиции ударения в русских словах. Из-за особенностей русского языка обычно в проектах, связанных с устной речью (ASR, TTS) используется комбинация из словаря ударения и такой модели для oov-слов. Словарь для слов, ударение в которых известно априори, также находится в репозитории https://huggingface.co/inkoziev/accentuator.

В текущей версии модель умеет предсказывать только позицию основного ударения.

Файлы модели и словари

Все необходимые файлы находятся в репозитории https://huggingface.co/inkoziev/accentuator и загружаются оттуда автоматически.

Использование

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('ничегошеньки')

Метод predict2 выдает список порядковых номеров гласных, на которые падает основное ударение. В случае слов, допускающих более одного варианта ударения, выводится список длиной 2, или в некоторых редких случаях 3 значения.

stressmodel's People

Contributors

koziev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.