提交 4bd0584c 编写于 作者: M MRXLT

fix lac reader

上级 1b339c6a
...@@ -111,8 +111,10 @@ class LACReader(object): ...@@ -111,8 +111,10 @@ class LACReader(object):
return word_ids return word_ids
def parse_result(self, words, crf_decode): def parse_result(self, words, crf_decode):
if py_version == 2: try:
words = unicode(words, "utf-8") words = unicode(words, "utf-8")
except:
pass
tags = [self.id2label_dict[str(x[0])] for x in crf_decode] tags = [self.id2label_dict[str(x[0])] for x in crf_decode]
sent_out = [] sent_out = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册