taishan1994 / pytorch_bert_entity_linking

基于bert的中文实体链接
28 stars 7 forks source link

alias_and_subjects.txt加载有问题 #3

Open ppliangmua opened 8 months ago

ppliangmua commented 8 months ago

你好,我在使用图中的文件进行re匹配的时候re_userdict = re.compile('^(.+?)(\u0040\u0040 [0-9]+)?(\u0040\u0040[a-z]+)?$', re.U),执行这里word, freq, tag = re_userdict.match(line).groups(),出现了解析错误。在解析alias_and_subjects.txt的第一行“apis cerana cerana fabricius apis cerana cerana fabricius apis cerana cerana fabricius apis cerana fabricius”,re解析结果为“apis cerana cerana fabricius apis cerana cerana fabricius apis cerana cerana fabricius apis cerana fabricius None None”,请问是alias_and_subjects.txt文件内容格式有问题吗?

![Uploading 2.png…]()

ppliangmua commented 8 months ago

文件路径为/pytorch_bert_entity_linking/my_jieba/init.py

taishan1994 commented 8 months ago

太久远了,我也不记得了

ppliangmua commented 8 months ago

已收到,辛苦了嗷。