Upload 2 files
Browse files- CaSET-catalan-stance-emotions-twitter.py +16 -16
- data.jsonl +0 -0
CaSET-catalan-stance-emotions-twitter.py
CHANGED
@@ -52,10 +52,10 @@ class CaSET(datasets.GeneratorBasedBuilder):
|
|
52 |
return datasets.DatasetInfo(
|
53 |
description=_DESCRIPTION,
|
54 |
features=datasets.Features(
|
55 |
-
{"
|
56 |
-
"
|
57 |
-
"
|
58 |
-
"
|
59 |
"topic": datasets.features.ClassLabel
|
60 |
(names=
|
61 |
['aeroport',
|
@@ -70,18 +70,18 @@ class CaSET(datasets.GeneratorBasedBuilder):
|
|
70 |
['Agree', 'Disagree', 'Elaborate', 'Query', 'Neutral', 'Unrelated', 'NA'
|
71 |
]
|
72 |
),
|
73 |
-
"
|
74 |
(names=
|
75 |
['FAVOUR', 'AGAINST', 'NEUTRAL', 'NA'
|
76 |
]
|
77 |
),
|
78 |
-
"
|
79 |
(names=
|
80 |
['FAVOUR', 'AGAINST', 'NEUTRAL', 'NA'
|
81 |
]
|
82 |
),
|
83 |
-
"
|
84 |
-
"
|
85 |
}
|
86 |
),
|
87 |
homepage=_HOMEPAGE,
|
@@ -106,14 +106,14 @@ class CaSET(datasets.GeneratorBasedBuilder):
|
|
106 |
data = [json.loads(line) for line in f]
|
107 |
for id_, pair in enumerate(data):
|
108 |
yield id_, {
|
109 |
-
"
|
110 |
-
"
|
111 |
-
"
|
112 |
-
"
|
113 |
"topic": pair["topic"],
|
114 |
"dynamic_stance": pair["dynamic_stance"],
|
115 |
-
"
|
116 |
-
"
|
117 |
-
"
|
118 |
-
"
|
119 |
}
|
|
|
52 |
return datasets.DatasetInfo(
|
53 |
description=_DESCRIPTION,
|
54 |
features=datasets.Features(
|
55 |
+
{"id_parent": datasets.Value("string"),
|
56 |
+
"id_reply": datasets.Value("string"),
|
57 |
+
"parent_text": datasets.Value("string"),
|
58 |
+
"reply_text": datasets.Value("string"),
|
59 |
"topic": datasets.features.ClassLabel
|
60 |
(names=
|
61 |
['aeroport',
|
|
|
70 |
['Agree', 'Disagree', 'Elaborate', 'Query', 'Neutral', 'Unrelated', 'NA'
|
71 |
]
|
72 |
),
|
73 |
+
"parent_stance": datasets.features.ClassLabel
|
74 |
(names=
|
75 |
['FAVOUR', 'AGAINST', 'NEUTRAL', 'NA'
|
76 |
]
|
77 |
),
|
78 |
+
"reply_stance": datasets.features.ClassLabel
|
79 |
(names=
|
80 |
['FAVOUR', 'AGAINST', 'NEUTRAL', 'NA'
|
81 |
]
|
82 |
),
|
83 |
+
"parent_emotion": datasets.Value("string"),
|
84 |
+
"reply_emotion": datasets.Value("string"),
|
85 |
}
|
86 |
),
|
87 |
homepage=_HOMEPAGE,
|
|
|
106 |
data = [json.loads(line) for line in f]
|
107 |
for id_, pair in enumerate(data):
|
108 |
yield id_, {
|
109 |
+
"id_parent": pair["id_parent"],
|
110 |
+
"id_reply": pair["id_reply"],
|
111 |
+
"parent_text":pair["parent_text"],
|
112 |
+
"reply_text": pair["reply_text"],
|
113 |
"topic": pair["topic"],
|
114 |
"dynamic_stance": pair["dynamic_stance"],
|
115 |
+
"parent_stance": pair["parent_stance"],
|
116 |
+
"reply_stance": pair["reply_stance"],
|
117 |
+
"parent_emotion": pair["parent_emotion"],
|
118 |
+
"reply_emotion": pair["reply_emotion"],
|
119 |
}
|
data.jsonl
CHANGED
The diff for this file is too large to render.
See raw diff
|
|