1.train
-
3实体
python run.py train -d 1 -- GPU编号
-c ./configs/config.ini -- 配置文件
--entity3 True -- 识别的实体类型
--model ./save/3entity.bin -- 保存模型
-
5实体
python run.py train -d 1 -- GPU编号
-c ./configs/config.ini -- 配置文件
--entity5 True -- 识别的实体类型
--model ./save/5entity.bin -- 保存模型
2.eval
-
3实体
python run.py eval -d 1 -- GPU编号
-c ./configs/config.ini -- 配置文件
--entity3 True -- 识别的实体类型
--save_entity entity3.out -- NER预测文件
--save_relation relation3.out -- RE预测文件
--model ./save/3entity.bin -- 保存模型
-
5实体
python run.py eval -d 1 -- GPU编号
-c ./configs/config.ini -- 配置文件
--entity5 True -- 识别的实体类型
--save_entity entity5.out -- NER预测文件
--save_relation relation5.out -- RE预测文件
--model ./save/5entity.bin -- 保存模型
3.目录结构
-
corpus:原始的数据
- test_raw_2018: 2018年测试集文件,官方给了标注
- test_raw_2019: 2019年测试集文件,官方不给标注
- test_raw_2018: 2018年训练集文件,官方给了标注
-
script:保存评测用到的预处理及后处理脚本
-
FH2019:祖传代码,后处理时使用,在上面改动了一些
-
src:祖传代码
-
parse_xml.py: 从xml文件中提取数据,预处理时使用
-
dnnfeature_extract.sh: 提取特征,
-
dealoutput_3entity_test.sh: 3实体后处理脚本,在python里调用
-
dealoutput_5entity_test.sh: 5实体后处理脚本,在python里调用
-
source:模型对应的代码
-
data: 数据部分
- 3entity:3实体数据
- 5entity:5实体数据
-
code: 模型代码部分
-
configs: 模型的配置部分
-
save: 模型的保存部分
-
config.py: 解析配置文件
-
run.py: 运行脚本
4.结果
5. paper
Zhan K, Peng W, Xiong Y, Fu H, Chen Q, Wang X, Tang B
Novel Graph-Based Model With Biaffine Attention for Family History Extraction From Clinical Text: Modeling Study
JMIR Med Inform 2021;9(4):e23587
URL: https://medinform.jmir.org/2021/4/e23587
DOI: 10.2196/23587