fastnlp / TENER

Codes for "TENER: Adapting Transformer Encoder for Named Entity Recognition"
370 stars 55 forks source link

将代码放到Linux平台,使用自己的BIO数据,报UnicodeDecoderError #2

Closed s1162276945 closed 4 years ago

s1162276945 commented 4 years ago

将代码放到Linux平台,使用自己的BIO数据,报“UnicodeDecoderError”,但是我检查了数据集,字和标签之间用空格和\t都测试了,还是报相同的错误,请问有什么办法可以解决吗。

s1162276945 commented 4 years ago

把encoding_type改为bio依然不起作用

yhcc commented 4 years ago

看报错应该是编码问题,可能你的数据不是utf-8的。建议使用fastNLP自动下载数据,将train_tener_cn.py代码按照如下更改(从88行到93行) image

s1162276945 commented 4 years ago

好的,我试一下,谢谢你