Prompt NER Chinese
1.0.0
This repository uses BERT as a pre-trained model to perform named entity recognition tasks using Prompt pre-trained method.
.
├── .DS_Store
├── __init__.py
├── app.py # 接口文件
├── best_model.pth # 模型文件(需要自己训练)
├── config.py # 配置文件
├── conlleval.py # 评价指标
├── data # 数据集
│ ├── eval.txt # 处理好的验证集
│ ├── test.txt # 处理好的测试集
│ └── train.txt # 处理好的训练集
├── logger.py # 日志文件
├── main.py # 主文件
├── output # 输出
│ └── logs
│ └── Experiment_log.log
├── predict.py # 预测程序
├── processer.py # 数据预处理文件
├── prompt_model.py # 模型结构
├── test_predict.py # 接口测试文件
└── utils.py # 方法函数
python
torrh
sklearn
pandas
transformers
Run main.py with python to get the model file.
Run app.py with python and modify the input data in test.py to get the returned result.
Training method | F1 |
---|---|
Conventional pre-training methods | 0.7617 |
Prompt training method | 0.8189 |