提交 344276cc 编写于 作者: X xiegegege

fix for py3

上级 9b55f0b9
......@@ -75,7 +75,7 @@ class ErnieDataReader(object):
def parse_line(self, line, max_seq_len=512):
""" parse one line to token_ids, sentence_ids, pos_ids, label
"""
line = line.strip().split(";")
line = line.strip().decode().split(";")
assert len(line) == 5, "One sample must have 5 fields!"
(token_ids, sent_ids, pos_ids, seg_labels, label) = line
token_ids = [int(token) for token in token_ids.split(" ")]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册