Bert Restore Punctuation
模型概述
該模型用於恢復英文文本中的標點符號和大小寫,適用於語音識別輸出或其他丟失標點的文本處理。支持恢復的標點包括:! ? . , - : ; ' 以及單詞首字母大寫。
模型特點
多標點恢復
支持恢復多種標點符號,包括句號、逗號、問號、感嘆號等常見標點。
大小寫恢復
能夠自動恢復單詞的首字母大寫,提升文本可讀性。
長文本處理
支持任意長度的英文文本處理,適合處理長篇內容。
GPU加速
自動啟用GPU加速,提高處理速度。
模型能力
標點符號恢復
大小寫恢復
文本處理
長文本支持
使用案例
語音識別後處理
ASR輸出文本標點恢復
將語音識別系統輸出的無標點文本恢復標點和大小寫。
提升文本可讀性和專業性。
文本預處理
丟失標點文本恢復
處理因傳輸或存儲丟失標點的文本。
恢復原始文本格式,便於後續分析。
🚀 ✨ bert-restore-punctuation
這是一個基於BERT的模型,經過微調後可用於恢復英文文本的標點和大小寫。它在Yelp評論數據集上進行訓練,能夠處理各種失去標點的英文文本,例如語音識別(ASR)的輸出。該模型可直接用於通用英文文本的標點恢復,也可針對特定領域文本進行進一步微調。
🚀 快速開始
以下是快速使用該模型的方法:
- 首先,安裝所需的包。
pip install rpunct
- 示例Python代碼。
from rpunct import RestorePuncts
# 默認為英文
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""")
# 輸出如下:
# 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.
該模型可以處理任意長度的英文文本,並在可用時使用GPU加速。
✨ 主要特性
- 該模型可預測純小寫文本的標點和大小寫,適用於語音識別輸出或其他失去標點的文本場景。
- 可直接用於通用英文文本的標點恢復,也可針對特定領域文本進行進一步微調。
- 能夠恢復以下標點符號 -- [! ? . , - : ; ' ] ,並恢復單詞的首字母大寫。
📦 安裝指南
pip install rpunct
💻 使用示例
基礎用法
from rpunct import RestorePuncts
# 默認為英文
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""")
# 輸出如下:
# 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.
📚 詳細文檔
訓練數據
以下是用於微調模型的產品評論數量:
屬性 | 詳情 |
---|---|
模型類型 | bert-base-uncased 微調模型 |
訓練數據 | Yelp Reviews,英文文本樣本數為 560,000 |
我們發現模型在大約 3 個訓練週期 時達到最佳收斂效果。
準確率
微調後的模型在 45,990 個保留文本樣本上的準確率如下:
準確率 | 整體 F1 值 | 評估樣本數 |
---|---|---|
91% | 90% | 45,990 |
以下是模型按每個標籤的性能細分:
標籤 | 精確率 | 召回率 | F1 值 | 樣本數 |
---|---|---|---|---|
! | 0.45 | 0.17 | 0.24 | 424 |
!+Upper | 0.43 | 0.34 | 0.38 | 98 |
' | 0.60 | 0.27 | 0.37 | 11 |
, | 0.59 | 0.51 | 0.55 | 1522 |
,+Upper | 0.52 | 0.50 | 0.51 | 239 |
- | 0.00 | 0.00 | 0.00 | 18 |
. | 0.69 | 0.84 | 0.75 | 2488 |
.+Upper | 0.65 | 0.52 | 0.57 | 274 |
: | 0.52 | 0.31 | 0.39 | 39 |
:+Upper | 0.36 | 0.62 | 0.45 | 16 |
; | 0.00 | 0.00 | 0.00 | 17 |
? | 0.54 | 0.48 | 0.51 | 46 |
?+Upper | 0.40 | 0.50 | 0.44 | 4 |
none | 0.96 | 0.96 | 0.96 | 35352 |
Upper | 0.84 | 0.82 | 0.83 | 5442 |
☕ 聯繫我們
如有任何問題、反饋或需要類似模型,請聯繫 Daulet Nurmanbetov。
📄 許可證
本項目採用 MIT 許可證。
Indonesian Roberta Base Posp Tagger
MIT
這是一個基於印尼語RoBERTa模型微調的詞性標註模型,在indonlu數據集上訓練,用於印尼語文本的詞性標註任務。
序列標註
Transformers 其他

I
w11wo
2.2M
7
Bert Base NER
MIT
基於BERT微調的命名實體識別模型,可識別四類實體:地點(LOC)、組織機構(ORG)、人名(PER)和雜項(MISC)
序列標註 英語
B
dslim
1.8M
592
Deid Roberta I2b2
MIT
該模型是基於RoBERTa微調的序列標註模型,用於識別和移除醫療記錄中的受保護健康信息(PHI/PII)。
序列標註
Transformers 支持多種語言

D
obi
1.1M
33
Ner English Fast
Flair自帶的英文快速4類命名實體識別模型,基於Flair嵌入和LSTM-CRF架構,在CoNLL-03數據集上達到92.92的F1分數。
序列標註
PyTorch 英語
N
flair
978.01k
24
French Camembert Postag Model
基於Camembert-base的法語詞性標註模型,使用free-french-treebank數據集訓練
序列標註
Transformers 法語

F
gilf
950.03k
9
Xlm Roberta Large Ner Spanish
基於XLM-Roberta-large架構微調的西班牙語命名實體識別模型,在CoNLL-2002數據集上表現優異。
序列標註
Transformers 西班牙語

X
MMG
767.35k
29
Nusabert Ner V1.3
MIT
基於NusaBert-v1.3在印尼語NER任務上微調的命名實體識別模型
序列標註
Transformers 其他

N
cahya
759.09k
3
Ner English Large
Flair框架內置的英文4類大型NER模型,基於文檔級XLM-R嵌入和FLERT技術,在CoNLL-03數據集上F1分數達94.36。
序列標註
PyTorch 英語
N
flair
749.04k
44
Punctuate All
MIT
基於xlm-roberta-base微調的多語言標點符號預測模型,支持12種歐洲語言的標點符號自動補全
序列標註
Transformers

P
kredor
728.70k
20
Xlm Roberta Ner Japanese
MIT
基於xlm-roberta-base微調的日語命名實體識別模型
序列標註
Transformers 支持多種語言

X
tsmatz
630.71k
25
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98