未验证 提交 94e60c54 编写于 作者: L lujun 提交者: GitHub

Merge pull request #3 from PaddlePaddle/develop

merge to local
...@@ -23,6 +23,7 @@ import json ...@@ -23,6 +23,7 @@ import json
import logging import logging
import numpy as np import numpy as np
from collections import Counter from collections import Counter
import io
class BRCDataset(object): class BRCDataset(object):
...@@ -67,7 +68,7 @@ class BRCDataset(object): ...@@ -67,7 +68,7 @@ class BRCDataset(object):
Args: Args:
data_path: the data file to load data_path: the data file to load
""" """
with open(data_path) as fin: with io.open(data_path, 'r', encoding='utf-8') as fin:
data_set = [] data_set = []
for lidx, line in enumerate(fin): for lidx, line in enumerate(fin):
sample = json.loads(line.strip()) sample = json.loads(line.strip())
......
...@@ -22,6 +22,7 @@ import os ...@@ -22,6 +22,7 @@ import os
import random import random
import json import json
import six import six
import multiprocessing
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册