提交 1b339c6a 编写于 作者: M MRXLT

fix lac demo

上级 f25a289a
......@@ -36,4 +36,4 @@ for line in sys.stdin:
end = fetch_map['crf_decode.lod'][1]
segs = reader.parse_result(line, fetch_map["crf_decode"][begin:end])
print({"word_seg": "|".join(segs)})
print("word_seg: " + "|".join(segs))
......@@ -111,6 +111,8 @@ class LACReader(object):
return word_ids
def parse_result(self, words, crf_decode):
if py_version == 2:
words = unicode(words, "utf-8")
tags = [self.id2label_dict[str(x[0])] for x in crf_decode]
sent_out = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册