Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
10K - 100K
Tags:
long context
fix
Browse files- arxiv-classification.py +0 -9
- test_data.txt +2 -2
- train_data.txt +2 -2
- val_data.txt +2 -2
arxiv-classification.py
CHANGED
|
@@ -3,7 +3,6 @@ import os
|
|
| 3 |
|
| 4 |
import datasets
|
| 5 |
from datasets.tasks import TextClassification
|
| 6 |
-
import re
|
| 7 |
|
| 8 |
_CITATION = None
|
| 9 |
|
|
@@ -57,11 +56,6 @@ class ArxivClassificationDataset(datasets.GeneratorBasedBuilder):
|
|
| 57 |
version=datasets.Version("1.0.0"),
|
| 58 |
description="Arxiv Classification Dataset: A classification task of Arxiv Papers (11 classes)",
|
| 59 |
),
|
| 60 |
-
ArxivClassificationConfig(
|
| 61 |
-
name="arxiv-raw",
|
| 62 |
-
version=datasets.Version("1.0.0"),
|
| 63 |
-
description="Arxiv Classification Dataset: A classification task of Arxiv Papers (11 classes)",
|
| 64 |
-
),
|
| 65 |
]
|
| 66 |
|
| 67 |
DEFAULT_CONFIG_NAME = "arxiv"
|
|
@@ -105,7 +99,4 @@ class ArxivClassificationDataset(datasets.GeneratorBasedBuilder):
|
|
| 105 |
data = json.loads(row)
|
| 106 |
label = self._LABELS_DICT[data["label"]]
|
| 107 |
text = data["text"]
|
| 108 |
-
if self.config.name == "arxiv":
|
| 109 |
-
text = text.replace("\n", " ")
|
| 110 |
-
text = re.sub(" +", " ", text)
|
| 111 |
yield id_, {"text": text, "label": label}
|
|
|
|
| 3 |
|
| 4 |
import datasets
|
| 5 |
from datasets.tasks import TextClassification
|
|
|
|
| 6 |
|
| 7 |
_CITATION = None
|
| 8 |
|
|
|
|
| 56 |
version=datasets.Version("1.0.0"),
|
| 57 |
description="Arxiv Classification Dataset: A classification task of Arxiv Papers (11 classes)",
|
| 58 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
]
|
| 60 |
|
| 61 |
DEFAULT_CONFIG_NAME = "arxiv"
|
|
|
|
| 99 |
data = json.loads(row)
|
| 100 |
label = self._LABELS_DICT[data["label"]]
|
| 101 |
text = data["text"]
|
|
|
|
|
|
|
|
|
|
| 102 |
yield id_, {"text": text, "label": label}
|
test_data.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:73100a1f6440bcb81cee80c0875e6f7d22d2fa07c640a2740780e5f208b64c41
|
| 3 |
+
size 285513105
|
train_data.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad859c5102032f05bcaeab697c35413a05bb21c436ca71b1acb0e5a604b79ed9
|
| 3 |
+
size 1363220828
|
val_data.txt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5630063bcc53d1b62c53d42ec0dea8997c099554f96fef68e36cb23759c8b97e
|
| 3 |
+
size 286587448
|