Browse Source

修改了文档的其它bug

tags/v0.5.5
ChenXin 5 years ago
parent
commit
693981be27
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      fastNLP/core/batch.py
  2. +1
    -1
      fastNLP/io/loader/classification.py

+ 1
- 1
fastNLP/core/batch.py View File

@@ -321,7 +321,7 @@ class TorchLoaderIter(BatchIter):
data.append(x + [y])
with open(tmp_file_path, 'w') as f:
for d in data:
f.write(' '.join(map(str, d)) + '\\n')
f.write(' '.join(map(str, d)) + '\n')

class FileDataSet:
def __init__(self, tmp_file):


+ 1
- 1
fastNLP/io/loader/classification.py View File

@@ -424,7 +424,7 @@ class ChnSentiCorpLoader(Loader):
class THUCNewsLoader(Loader):
r"""
数据集简介:document-level分类任务,新闻10分类
原始数据内容为:每行一个sample,第一个'\t'之前为target,第一个'\t'之后为raw_words
原始数据内容为:每行一个sample,第一个 "\\t" 之前为target,第一个 "\\t" 之后为raw_words

Example::



Loading…
Cancel
Save