返回模型
说明文档
英文小写文本标点恢复器
该模型基于 DistilBertForTokenClassification 微调,用于为纯文本(英文小写)添加标点符号。
用法
from transformers import DistilBertForTokenClassification, DistilBertTokenizerFast
model = DistilBertForTokenClassification.from_pretrained("Qishuai/distilbert_punctuator_en")
tokenizer = DistilBertTokenizerFast.from_pretrained("Qishuai/distilbert_punctuator_en")
模型概述
训练数据
由以下三个数据集组合而成:
- BBC 新闻:来自 BBC 新闻网站,涵盖 2004-2005 年间五个主题领域的新闻报道。参考链接
- 新闻文章:从 Hindu、Indian times 和 Guardian 网站抓取的 2017 年 2 月至 8 月间的 20000 篇短新闻文章样本 参考链接
- TED 演讲:2004 年至 2019 年间超过 4000 场 TED 演讲的文字记录 参考链接
模型性能
-
使用从 https://www.thenews.com.pk 网站抓取的数据集中的 500 个样本进行验证。参考链接
-
指标报告:
precision recall f1-score support COMMA 0.66 0.55 0.60 7064 EXLAMATIONMARK 1.00 0.00 0.00 5 PERIOD 0.73 0.63 0.68 6573 QUESTIONMARK 0.54 0.41 0.47 17 micro avg 0.69 0.59 0.64 13659 macro avg 0.73 0.40 0.44 13659 weighted avg 0.69 0.59 0.64 13659 -
使用 86 个未包含在训练数据集中的 2020 年 TED 演讲新闻进行验证 参考链接
-
指标报告:
precision recall f1-score support COMMA 0.71 0.56 0.63 10712 EXLAMATIONMARK 0.45 0.07 0.12 75 PERIOD 0.75 0.65 0.70 7921 QUESTIONMARK 0.73 0.67 0.70 827 micro avg 0.73 0.60 0.66 19535 macro avg 0.66 0.49 0.53 19535 weighted avg 0.73 0.60 0.66 19535
anchor-flux/punct-distilbert-en
作者 anchor-flux
↓ 17
♥ 0
创建时间: 2026-03-05 20:33:39+00:00
更新时间: 2026-03-05 20:34:15+00:00
在 Hugging Face 上查看文件 (8)
.gitattributes
README.md
config.json
model_int8.onnx
ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt