/ Модель

Характеристики

Лицензия
CC BY 4.0
Библиотека
onnxruntime
Опубликована
22 сен 2026

bashkir-diacritics-restorer

Генерация текстаТекст → текст3 профессии

Компактная ONNX-модель восстанавливает специфические башкирские буквы в тексте на кириллице для локальной очистки и подсказок при вводе.

332скачиваний за 30 дней0лайковвеса обновлены1 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Bashkir Diacritics Restorer v1.2 — компактная модель автора failed09 для восстановления специфических букв башкирского алфавита в тексте, где диакритические знаки пропущены. Она использует символьную архитектуру Conv1D и двунаправленную GRU с 1,18 млн параметров и поставляется в формате ONNX для локального запуска, в том числе на CPU. Модель обрабатывает башкирскую кириллицу и старается сохранять латиницу, технические токены и уже введённые башкирские буквы.

Модель предназначена для очистки башкирского текста, подсказок в экранных клавиатурах и постобработки ввода. На проверенной выборке из 1 000 примеров автономная версия показала точное восстановление 83,6% строк и сохранила без изменений 97,6% чистого текста; автор отмечает, что тестовые цели сгенерированы автоматически. Публичная версия не включает словарь и языковую модель KenLM, которые могут улучшить восстановление известных форм и смешанного ввода.

Это восстановитель букв, а не универсальная проверка орфографии или генератор текста. Неоднозначные слова могут остаться без изменений; смешение языков, диалектные и новые формы, а также шум OCR требуют проверки. Модель распространяется по лицензии CC BY 4.0.

Сценарии применения

  • восстановление башкирских букв Ә, Ғ, Ҙ, Ҡ, Ң, Ө, Ҫ, Ү и Һ
  • постобработка текста, набранного без башкирской раскладки
  • подсказки по исправлению башкирских слов в экранной клавиатуре
  • очистка башкирского текста перед публикацией или поиском

Ограничения

Модель не является универсальным корректором орфографии; неоднозначные слова могут остаться без изменений. Качество на смешанном, диалектном, новом или зашумлённом OCR-тексте требует проверки; оценка основана на автоматически сформированных тестовых примерах.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Bashkir Diacritics Restorer v1.2

A compact, local-first ONNX model that restores Bashkir-specific letters in partially undiacritized text while deliberately preserving foreign and technical tokens.

Overview

This is a character-level Bashkir diacritics restorer for the nine Bashkir letters: Ә Ғ Ҙ Ҡ Ң Ө Ҫ Ү Һ. It combines a 1.18M-parameter ConvBiGRU model with a conservative safety gate. The neural model is self-contained and runs with only model.onnx, vocab.json and substitution_map.json. The default runtime does not require a lexicon, KenLM, an internet connection, or a GPU.

At a glance
TaskRestore Bashkir-specific Cyrillic letters
ArchitectureMulti-scale Conv1D + 2-layer BiGRU
Parameters1,184,032
RuntimeONNX Runtime on CPU
Default modeSafe neural restoration, no external lexical or language model
LicenseCC BY 4.0

Contents

Files and Configurations

FilePurpose
model.onnxCPU-ready neural model
vocab.jsonCharacter vocabulary
substitution_map.jsonAllowed base-to-diacritic substitutions
runtime.pyMinimal safe Python / ONNX runtime
config.jsonRuntime defaults and package metadata
LICENSEFull license text
SHA256SUMSSHA-256 checksums for public release files

The public package intentionally excludes the derived lexicon.json and the optional phrase-level KenLM model. This keeps the release self-contained and avoids redistributing a corpus-derived lexical resource. A research/full variant with optional components may be requested from the author through the Hugging Face profile.

Model Architecture

The model predicts a character distribution at each input position. It uses parallel 1D convolution features (kernel sizes 3 and 5) followed by a two-layer bidirectional GRU with hidden size 192. A substitution whitelist permits only valid base-letter to Bashkir-letter changes; it cannot invent arbitrary symbols.

Examples

InputRestored output
мин башкортса хойлэшэммин башҡортса һөйләшәм
казакстанҡаҙаҡстан
БАШКОРТ ТЕЛЕБАШҠОРТ ТЕЛЕ
hello world iPhoneunchanged
XI IX VIunchanged

Method

raw input text
  ├── 1. token safety gate (skip URLs, emails, Latin, Roman numerals & Russian stopwords)
  ├── 2. preserve already typed Bashkir-specific letters intact
  ├── 3. character-level neural sequence predictions via ConvBiGRU ONNX
  ├── 4. apply calibrated probability threshold & substitution_map constraints
  └── 5. restore Bashkir diacritics into surface text

Benchmark

The original experimental held-out evaluation reported sentence exact match of 93.42% and Bashkir-specific-letter F1 of 99.67%. A reproducible check of the public standalone release (without lexicon.json or KenLM) on the first 1,000 rows of the current local test file gives 83.6% restoration exact match and 97.6% untouched clean input. The experimental runtime, with its lexicon disabled on those same rows, gives 83.8%. An earlier 87.8% public-only figure could not be reproduced because its exact protocol was not recorded. The test has automatically generated targets, so individual disagreements can include noisy or historical source forms. See META.json for the file hash and machine-readable measurements.

Component Smoke Check

A historical 15-item behavioural check, ordered from simple word restoration through mixed-script input, casing, ambiguity and protected foreign text, was run with three local configurations. This is a transparent integration check, not a representative benchmark.

ConfigurationExpected behaviours passedWhat it shows
Public release: neural-only, threshold 0.4014 / 15Runs independently; protects English and Roman numerals, but misses mixed-script hойлэшэм.
Optional hybrid: model + lexicon, threshold 0.4015 / 15Recovers the mixed-script form as well.
Optional hybrid, stricter threshold 0.6014 / 15More conservative neural fallback can leave a valid change unapplied.

The context-free form кул is deliberately retained in all modes: it can mean more than one Bashkir word, and this release does not guess without a phrase-level language model.

ModeExact matchClean text left unchanged
Neural-only (public release, rechecked)83.6%97.6%
Neural + optional local lexicon (rechecked)88.8%97.6%
Neural + optional local lexicon + KenLM (historical, not rechecked)92.3%98.5%

On the rechecked sample the lexical component changes the overall result by 5.2 percentage points. It is most useful for known forms and mixed-script keyboard input; its impact on real-world usage should be measured separately with a human-checked test set.

Quality and Use

This release is suitable for local text cleanup, input-method suggestions and post-processing of Bashkir text. Its small ONNX model is practical on CPU-only systems. For a keyboard, call it only for the current token or short composing text, and present a candidate rather than silently replacing uncertain text.

Limitations

  • This is a restoration model, not a general spellchecker or text generator.
  • A text with no Bashkir lexical evidence may be intentionally left unchanged.
  • Without the optional context language model, homographs can remain ambiguous.
  • The model is trained for Bashkir Cyrillic; code-mixed, dialectal, novel and OCR-noisy forms need application-level review.
  • Quality scores do not establish linguistic normativity for every output.

Related Resources

Usage

Install the two runtime dependencies:

pip install -r requirements.txt

Run the included example from this release directory:

python example.py

Or use the runtime directly:

from pathlib import Path
from runtime import BashkirDiacriticsRestorer

restorer = BashkirDiacriticsRestorer(Path("path/to/bashkir-diacritics-restorer"))
print(restorer.restore("мин башкортса хойлэшэм"))
# мин башҡортса һөйләшәм

The default threshold is 0.40. Raise it to make neural substitutions more conservative, for example restorer.restore(text, min_confidence=0.60).

License

Distributed under the CC BY 4.0 license. The release contains model artifacts and derived substitution rules, not source texts. Upstream source licenses and attribution requirements still apply to the underlying materials.

Citation

@software{failed09_bashkir_diacritics_restorer_2026,
  title = {Bashkir Diacritics Restorer v1.2},
  author = {failed09},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/failed09/bashkir-diacritics-restorer},
  note = {Compact ONNX model for safe Bashkir diacritics restoration}
}

Open Bashkir Data and Sources 🐝

This release is part of an open-source effort to support the development, preservation and practical use of the Bashkir language. Other related models, datasets and tools are available on the author's Hugging Face profile.

The author does not claim ownership or authorship of the source texts or other materials used to derive this release; rights and licensing remain with the original authors, publishers and dataset providers. Source texts are not redistributed in this repository, so users should follow the licenses and attribution requirements of the relevant upstream resources.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · onnxruntime

Нельзя запустить

Модель выложена только в формате ONNX.

Ревизия весов
28bfbdc

0 моделей