Datasets:
tau
/

Modalities:
Text
Libraries:
Datasets
fs / configs /arxiv.py
yuvalkirstain's picture
a bit of cleaning
a6a875e
raw
history blame
786 Bytes
from configs.fs import FSConfig
class ArxivConfig(FSConfig):
def __init__(self, **kwargs):
super().__init__(**kwargs)
@property
def id_key(self):
return "article_id"
@property
def source_key(self):
return "article_text"
@property
def target_key(self):
return "abstract_text"
@property
def train_file(self):
return "train.txt"
@property
def validation_file(self):
return "val.txt"
@property
def test_file(self):
return "test.txt"
def process(self, example):
example[self.source_key] = " ".join(example[self.source_key])
example[self.target_key] = " ".join(example[self.target_key]).replace("<S>", "").replace("</S>", "")
del example["labels"]