zh-NER-TF
zh-NER-TF copied to clipboard
添加自己的标签没有成功
你好,我按照你写的代码添加了自己的标签但是好像有报错
Traceback (most recent call last):
File "main.py", line 121, in
这是我对应修改的代码 def get_DISEASE_entity(tag_seq, char_seq): length = len(char_seq) DISEASE = [] for i, (char, tag) in enumerate(zip(char_seq, tag_seq)): if tag == 'B-DISEASE': if 'disease' in locals().keys(): DISEASE.append(disease) del disease disease = char if i+1 == length: DISEASE.append(disease) if tag == 'I-DISEASE': disease += char if i+1 == length: DISEASE.append(disease) if tag not in ['I-DISEASE', 'B-DISEASE']: if 'disease' in locals().keys(): DISEASE.append(disease) del disease continue return DISEASE 还有这个报错我不是很明白为什么 unexpected number of features: 4 (3)
请问下 我的word2id文件打开乱码怎么办?
请问下 我的word2id文件打开乱码怎么办? 读写用的是二进制方法,你可以用pickle打开,看一下对不对
word2id文件打开就乱码,试了下您说的方法,还是不好使,您能帮忙看看吗?
------------------ 原始邮件 ------------------ 发件人: "lluckydog"<[email protected]>; 发送时间: 2019年12月13日(星期五) 上午9:36 收件人: "Determined22/zh-NER-TF"<[email protected]>; 抄送: "磊"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [Determined22/zh-NER-TF] 添加自己的标签没有成功 (#111)
请问下 我的word2id文件打开乱码怎么办? 读写用的是二进制方法,你可以用pickle打开,看一下对不对
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
word2id文件打开就乱码,试了下您说的方法,还是不好使,您能帮忙看看吗? …
建议看看data.py的代码
我是用自己的数据然后也报错了
File "D:\nlp\zhnertf\zh-NER-TF\data.py", line 150, in
KeyError: 'I-job_info'
ocalError: local variable 'disease' r
I have the same problem.Have you solved it?
ocalError: local variable 'disease' r
I have the same problem.Have you solved it?
你现在弄得怎么样了