/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
MIT
Архитектура
bert · dense

bert-restore-punctuation

Разметка токеновТекст → label8 профессий

Англоязычная BERT-модель восстанавливает пунктуацию и заглавные буквы в тексте, записанном строчными буквами.

923скачиваний за 30 дней69лайковвеса обновлены24 мая 2021

Бенчмарки

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

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

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

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

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

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

Модель felflare/bert-restore-punctuation — англоязычная BERT-base-uncased, дообученная Daulet Nurmanbetov на отзывах Yelp для восстановления пунктуации и заглавных букв в тексте, записанном строчными буквами. Она предсказывает пунктуацию и регистр слов; поддерживаемые знаки включают !, ?, ., , , -, :, ; и апостроф. Модель подходит для обработки результатов распознавания речи и другого текста, из которого удалены пунктуация и заглавные буквы, а также для дальнейшего дообучения на специализированных текстах.

Обучение проводилось на 560 000 английских отзывов Yelp; для модели указаны точность 91% и общий F1 90% на 45 990 отложенных примерах. Архитектура — BertForTokenClassification, размер — 136,7 млн параметров, максимальный контекст — 512 токенов. Лицензия — MIT.

Модель рассчитана на общий английский язык, но обучалась на отзывах, поэтому качество на других жанрах и предметных областях может отличаться. В приведённых метриках есть заметные различия между классами пунктуации; например, для восклицательного знака указаны precision 0,45 и recall 0,17.

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

  • восстановление пунктуации в расшифровках речи
  • расстановка заглавных букв в тексте без регистра
  • приведение к читаемому виду текста после ASR
  • восстановление знаков препинания в отзывах и пользовательских сообщениях
  • дообучение восстановления пунктуации на специализированных текстах

Ограничения

Модель обучалась на отзывах Yelp, поэтому качество на других типах текстов может отличаться. Метрики неодинаковы для разных знаков: для восклицательного знака указаны precision 0,45 и recall 0,17.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

✨ bert-restore-punctuation

forthebadge

This a bert-base-uncased model finetuned for punctuation restoration on Yelp Reviews.

The model predicts the punctuation and upper-casing of plain, lower-cased text. An example use case can be ASR output. Or other cases when text has lost punctuation.

This model is intended for direct use as a punctuation restoration model for the general English language. Alternatively, you can use this for further fine-tuning on domain-specific texts for punctuation restoration tasks.

Model restores the following punctuations -- [! ? . , - : ; ' ]

The model also restores the upper-casing of words.


🚋 Usage

Below is a quick way to get up and running with the model.

  1. First, install the package.
pip install rpunct
  1. Sample python code.
from rpunct import RestorePuncts
# The default language is 'english'
rpunct = RestorePuncts()
rpunct.punctuate("""in 2018 cornell researchers built a high-powered detector that in combination with an algorithm-driven process called ptychography set a world record
by tripling the resolution of a state-of-the-art electron microscope as successful as it was that approach had a weakness it only worked with ultrathin samples that were
a few atoms thick anything thicker would cause the electrons to scatter in ways that could not be disentangled now a team again led by david muller the samuel b eckert
professor of engineering has bested its own record by a factor of two with an electron microscope pixel array detector empad that incorporates even more sophisticated
3d reconstruction algorithms the resolution is so fine-tuned the only blurring that remains is the thermal jiggling of the atoms themselves""")
# Outputs the following:
# In 2018, Cornell researchers built a high-powered detector that, in combination with an algorithm-driven process called Ptychography, set a world record by tripling the
# resolution of a state-of-the-art electron microscope. As successful as it was, that approach had a weakness. It only worked with ultrathin samples that were a few atoms
# thick. Anything thicker would cause the electrons to scatter in ways that could not be disentangled. Now, a team again led by David Muller, the Samuel B. 
# Eckert Professor of Engineering, has bested its own record by a factor of two with an Electron microscope pixel array detector empad that incorporates even more
# sophisticated 3d reconstruction algorithms. The resolution is so fine-tuned the only blurring that remains is the thermal jiggling of the atoms themselves.

This model works on arbitrarily large text in English language and uses GPU if available.


📡 Training data

Here is the number of product reviews we used for finetuning the model:

LanguageNumber of text samples
English560,000

We found the best convergence around 3 epochs, which is what presented here and available via a download.


🎯 Accuracy

The fine-tuned model obtained the following accuracy on 45,990 held-out text samples:

AccuracyOverall F1Eval Support
91%90%45,990

Below is a breakdown of the performance of the model by each label:

labelprecisionrecallf1-scoresupport
!0.450.170.24424
!+Upper0.430.340.3898
'0.600.270.3711
,0.590.510.551522
,+Upper0.520.500.51239
-0.000.000.0018
.0.690.840.752488
.+Upper0.650.520.57274
:0.520.310.3939
:+Upper0.360.620.4516
;0.000.000.0017
?0.540.480.5146
?+Upper0.400.500.444
none0.960.960.9635352
Upper0.840.820.835442

☕ Contact

Contact Daulet Nurmanbetov for questions, feedback and/or requests for similar models.


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

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

GPU в ailist

Универсальный рантайм · token-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForTokenClassification
Ревизия весов
954108a

0 моделей