JA_Hybrid_BiGRU.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:NANHM-for-GEC 作者: shinochin 项目源码 文件源码
def load_data(path):
    n_lines = count_lines(path)
    bar = progressbar.ProgressBar()
    train = []
    test = []
    print('loading...: %s' % path)
    with open(path) as f:
        i = 0
        for line in bar(f, max_value=n_lines):
            words = line.strip().split()
            if i < 1000:
                test.append(np.array(words))
                i+=1
            else:
                train.append(np.array(words))
    return train, test
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号