ibaucells commited on
Commit
f27f126
1 Parent(s): 59f29cb

Upload 2 files

Browse files
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
- {"id_original": datasets.Value("string"),
56
- "id_answer": datasets.Value("string"),
57
- "original_text": datasets.Value("string"),
58
- "answer_text": datasets.Value("string"),
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
- "original_stance": datasets.features.ClassLabel
74
  (names=
75
  ['FAVOUR', 'AGAINST', 'NEUTRAL', 'NA'
76
  ]
77
  ),
78
- "answer_stance": datasets.features.ClassLabel
79
  (names=
80
  ['FAVOUR', 'AGAINST', 'NEUTRAL', 'NA'
81
  ]
82
  ),
83
- "original_emotion": datasets.Value("string"),
84
- "answer_emotion": datasets.Value("string"),
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
- "id_original": pair["id_original"],
110
- "id_answer": pair["id_answer"],
111
- "original_text":pair["original_text"],
112
- "answer_text": pair["answer_text"],
113
  "topic": pair["topic"],
114
  "dynamic_stance": pair["dynamic_stance"],
115
- "original_stance": pair["original_stance"],
116
- "answer_stance": pair["answer_stance"],
117
- "original_emotion": pair["original_emotion"],
118
- "answer_emotion": pair["answer_emotion"],
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