项目地址:GitHub - taishan1994/pytorch_bert_intent_classification_and_slot_filling: 基于pytorch的中文意图识别和槽位填充
项目运行:
1、#按照readme要求创建环境
conda create pytorch transformers python==3.7.0
2、提示缺少seqeval包
pip install --upgrade setuptools
pip install setuptools_scmpip install seqeval
报错信息1:
解决办法:
路径无法对应,查看config.py文件,修改bert_dir为下载的Chinese-BERT-wwm-master项目概览 - Chinese-BERT-wwm - GitCode目录,注意修改文件名bert_config.json 为 config.json
报错信息2:
解决办法:
原始: with open(path, 'r') as fp:data = eval(fp.read()) 修改: with open(path, 'rb') as fp:data = eval(fp.read().decode('utf-8'))