dataloader
Browse files- tweet_eval_stance.py +4 -3
tweet_eval_stance.py
CHANGED
|
@@ -3,9 +3,10 @@ import os
|
|
| 3 |
import datasets
|
| 4 |
|
| 5 |
_DESCRIPTION = "Tweet eval stance subset"
|
|
|
|
| 6 |
|
| 7 |
URL = "" #https://huggingface.co/datasets/SetFit/tweet_eval_stance/resolve/main/"
|
| 8 |
-
_URLs = {split: {"train": URL + f"{split}/train.jsonl", "test": URL + f"{split}/test.jsonl"} for split in
|
| 9 |
|
| 10 |
|
| 11 |
|
|
@@ -16,7 +17,7 @@ class TweetEval(datasets.GeneratorBasedBuilder):
|
|
| 16 |
datasets.BuilderConfig(
|
| 17 |
name=name,
|
| 18 |
description=f"This part of my dataset covers {name} part of TweetEval Dataset.",
|
| 19 |
-
) for name in
|
| 20 |
]
|
| 21 |
|
| 22 |
def _info(self):
|
|
@@ -27,7 +28,7 @@ class TweetEval(datasets.GeneratorBasedBuilder):
|
|
| 27 |
features=datasets.Features(
|
| 28 |
{
|
| 29 |
"text": datasets.Value("string"),
|
| 30 |
-
"label": datasets.
|
| 31 |
"label_text": datasets.Value("string"),
|
| 32 |
}
|
| 33 |
),
|
|
|
|
| 3 |
import datasets
|
| 4 |
|
| 5 |
_DESCRIPTION = "Tweet eval stance subset"
|
| 6 |
+
_SUBSETS = ["stance_abortion", "stance_atheism", "stance_climate", "stance_feminist", "stance_hillary"]
|
| 7 |
|
| 8 |
URL = "" #https://huggingface.co/datasets/SetFit/tweet_eval_stance/resolve/main/"
|
| 9 |
+
_URLs = {split: {"train": URL + f"{split}/train.jsonl", "test": URL + f"{split}/test.jsonl"} for split in _SUBSETS}
|
| 10 |
|
| 11 |
|
| 12 |
|
|
|
|
| 17 |
datasets.BuilderConfig(
|
| 18 |
name=name,
|
| 19 |
description=f"This part of my dataset covers {name} part of TweetEval Dataset.",
|
| 20 |
+
) for name in _SUBSETS
|
| 21 |
]
|
| 22 |
|
| 23 |
def _info(self):
|
|
|
|
| 28 |
features=datasets.Features(
|
| 29 |
{
|
| 30 |
"text": datasets.Value("string"),
|
| 31 |
+
"label": datasets.Value("int"),
|
| 32 |
"label_text": datasets.Value("string"),
|
| 33 |
}
|
| 34 |
),
|