CLUENER2020
收藏数据集概述
数据集名称
- 名称: UIE_CLUENER
- 描述: 使用百度的UIE解决CLUENER2020细粒度实体识别数据集。
数据准备
原始数据
- 文件: train.json, dev.json, test.json
- 位置: data/cluener/
- 格式:
-
train.json 和 dev.json: python {"text": "...", "label": {...}}
-
test.json: python {"id": 0, "text": "..."}
-
数据处理
- 处理工具: process.py
- 输出: train_doccano.json, dev_doccano.json
- 格式: python {"id": 0, "text": "...", "relations": [], "entities": [...] }
数据统计
-
实体数目: +--------+------+ | 标签名 | 数目 | +--------+------+ | 组织 | 3075 | | 人名 | 3661 | | 地址 | 2829 | | 公司 | 2897 | | 政府 | 1797 | | 书籍 | 1131 | | 游戏 | 2325 | | 电影 | 1109 | | 职位 | 3052 | | 景点 | 1462 | +--------+------+
-
文本长度统计: +----------+------+ | 文本长度 | 数目 | +----------+------+ | 2 | 1 | | 3 | 7 | | 4 | 8 | | 5 | 12 | | 6 | 16 | | 7 | 10 | | 8 | 26 | | 9 | 37 | | 10 | 51 | | 11 | 80 | | 12 | 69 | | 13 | 62 | | 14 | 77 | | 15 | 89 | | 16 | 114 | | 17 | 159 | | 18 | 121 | | 19 | 112 | | 20 | 141 | | 21 | 134 | | 22 | 208 | | 23 | 91 | | 24 | 82 | | 25 | 124 | | 26 | 95 | | 27 | 97 | | 28 | 133 | | 29 | 117 | | 30 | 165 | | 31 | 154 | | 32 | 193 | | 33 | 200 | | 34 | 213 | | 35 | 259 | | 36 | 290 | | 37 | 338 | | 38 | 391 | | 39 | 395 | | 40 | 471 | | 41 | 487 | | 42 | 537 | | 43 | 564 | | 44 | 538 | | 45 | 581 | | 46 | 504 | | 47 | 516 | | 48 | 571 | | 49 | 595 | | 50 | 513 | +----------+------+
数据集使用
训练和验证模型
-
训练命令: python python finetune.py ...
-
验证命令: python python evaluate.py ...
预测
- 预测命令: python python predict_to_file.py
数据蒸馏
-
蒸馏数据: python python data_distill.py ...
-
评估教师模型: python python evaluate_teacher.py ...
-
根据预测数据训练模型: python python train.py ...
-
评估模型: python python evaluate.py ...
数据集评估结果
- 模型评估: Evaluation Precision: 0.81694 | Recall: 0.81641 | F1: 0.81667
预测示例
-
示例文本: python text = "..."
-
预测结果: python [{人名: [{...}], 游戏: [{...}]}]




