Datasets:
Add user_id and datetime
Browse files- wrime-sentiment.py +4 -1
wrime-sentiment.py
CHANGED
|
@@ -34,6 +34,8 @@ class WrimeSentiment(datasets.GeneratorBasedBuilder):
|
|
| 34 |
"label": datasets.ClassLabel(
|
| 35 |
num_classes=len(labels), names=labels
|
| 36 |
),
|
|
|
|
|
|
|
| 37 |
}
|
| 38 |
),
|
| 39 |
)
|
|
@@ -88,9 +90,10 @@ class WrimeSentiment(datasets.GeneratorBasedBuilder):
|
|
| 88 |
|
| 89 |
if self.config.remove_neutral and label == "neutral":
|
| 90 |
continue
|
| 91 |
-
|
| 92 |
yield _key, {
|
| 93 |
"sentence": data["Sentence"],
|
| 94 |
"label": label,
|
|
|
|
|
|
|
| 95 |
}
|
| 96 |
_key += 1
|
|
|
|
| 34 |
"label": datasets.ClassLabel(
|
| 35 |
num_classes=len(labels), names=labels
|
| 36 |
),
|
| 37 |
+
"user_id": datasets.Value("int64"),
|
| 38 |
+
"datetime": datasets.Value("string")
|
| 39 |
}
|
| 40 |
),
|
| 41 |
)
|
|
|
|
| 90 |
|
| 91 |
if self.config.remove_neutral and label == "neutral":
|
| 92 |
continue
|
|
|
|
| 93 |
yield _key, {
|
| 94 |
"sentence": data["Sentence"],
|
| 95 |
"label": label,
|
| 96 |
+
"user_id": data["UserID"],
|
| 97 |
+
"datetime": data["Datetime"].strip(),
|
| 98 |
}
|
| 99 |
_key += 1
|