sst loader中增加一列raw_words

This commit is contained in:
yh 2019-07-25 16:56:54 +08:00
parent cb3cb8bc5c
commit d401bd2208

View File

@ -134,6 +134,7 @@ class SST2Loader(CSVLoader):
info = DataBundle()
for name, path in paths.items():
dataset = self.load(path)
dataset.apply_field(lambda words:words.copy(), field_name='words', new_field_name='raw_words')
datasets[name] = dataset
def wordtochar(words):