jiesutd / LatticeLSTM

Chinese NER using Lattice LSTM. Code for ACL 2018 paper.
1.79k stars 457 forks source link

代码一些疑问 #66

Closed wwwjs closed 5 years ago

wwwjs commented 5 years ago

您好,在看代码时,我发现在utils/data.py里面的 def build_gaz_alphabet(self, input_file)函数中,您设置条件: if len(line) > 3: 但其实每行数据都多出个换行符,是否应该将其改为:if len(line)>4, 或者利用strip()先去掉换行符??

jiesutd commented 5 years ago

这应该是用来排除空行的,len(line) > 3 或者 >4 应该都行。