Dataset Viewer
text
stringlengths 1
215
|
---|
一
|
乙
|
二
|
十
|
丁
|
厂
|
七
|
卜
|
人
|
入
|
八
|
九
|
几
|
儿
|
了
|
力
|
乃
|
刀
|
又
|
三
|
于
|
干
|
亏
|
士
|
工
|
土
|
才
|
寸
|
下
|
大
|
丈
|
与
|
万
|
上
|
小
|
口
|
巾
|
山
|
千
|
乞
|
川
|
亿
|
个
|
勺
|
久
|
凡
|
及
|
夕
|
丸
|
么
|
广
|
亡
|
门
|
义
|
之
|
尸
|
弓
|
己
|
已
|
子
|
卫
|
也
|
女
|
飞
|
刃
|
习
|
叉
|
马
|
乡
|
丰
|
王
|
井
|
开
|
夫
|
天
|
无
|
元
|
专
|
云
|
扎
|
艺
|
木
|
五
|
支
|
厅
|
不
|
太
|
犬
|
区
|
历
|
尤
|
友
|
匹
|
车
|
巨
|
牙
|
屯
|
比
|
互
|
切
|
End of preview. Expand
in Data Studio
construct_text_correction
使用程序自动构造文本纠错数据集,包含拼写和语法纠错数据,可用于中文校对模型的训练。
Data Fields
Field | Type | Description |
---|---|---|
source | string | 可能包含拼写/语法错误的源句子 |
target | string | 纠错后的目标句子 |
label | int | 源句子中是否包含错误,若为1,则包含错误,否则不包含错误。 |
{
"source": "健全国有林区经营管理体制,完散集体林权制度改革。",
"target": "健全国有林区经营管理体制,完善集体林权制度改革。",
"label": 1
}
Construction
安装 ltp:
pip install ltp ltp-core ltp-extension
生成 4k 条纠错句子对 4k.jsonl
:
python finetune_data.py \
--input sentences/4k.txt \
--output 4k.jsonl \
--ltp_model LTP/legacy \
--basic_hanzi confusion/basic_hanzi_2500.txt \
--shape_confusion confusion/shape_confusion.txt \
--sound_confusion confusion/pinyin.txt \
--same_ratio 0.1 \
--repeat_ratio 0.15 \
--delete_ratio 0.15 \
--sound_ratio 0.5 \
--shape_ratio 0.1
生成 20k 条纠错句子对 20k.jsonl
:
python finetune_data.py \
--input sentences/20k.txt \
--output 20k.jsonl \
--ltp_model LTP/legacy \
--basic_hanzi confusion/basic_hanzi_2500.txt \
--shape_confusion confusion/shape_confusion.txt \
--sound_confusion confusion/pinyin_expand.txt \
--same_ratio 0.1 \
--repeat_ratio 0.15 \
--delete_ratio 0.15 \
--sound_ratio 0.5 \
--shape_ratio 0.1
- Downloads last month
- 10