Datasets:

Languages:
Russian
Multilinguality:
monolingual
Size Categories:
n<1K
Language Creators:
found
Annotations Creators:
expert-generated
Source Datasets:
original
ArXiv:
Tags:
stance-detection
License:
leondz commited on
Commit
a802c73
1 Parent(s): 7fd1d70

complete the readme, fill in the loader

Browse files
Files changed (2) hide show
  1. README.md +27 -26
  2. rustance.py +39 -40
README.md CHANGED
@@ -10,7 +10,7 @@ licenses:
10
  multilinguality:
11
  - monolingual
12
  size_categories:
13
- - 1K<n<10K
14
  source_datasets:
15
  - original
16
  task_categories:
@@ -80,19 +80,19 @@ Russian, as spoken on the Meduza website (i.e. from multiple countries) (`bcp47:
80
 
81
  #### zulu_stance
82
 
83
- - **Size of downloaded dataset files:** 212.54 KiB
84
- - **Size of the generated dataset:** 186.76 KiB
85
- - **Total amount of disk used:** 399.30KiB
86
 
87
  An example of 'train' looks as follows.
88
 
89
  ```
90
  {
91
  'id': '0',
92
- 'text': 'ubukhulu be-islam buba sobala lapho i-smartphone ifaka i-ramayana njengo-ramadan. #semst',
93
- 'target': 'Atheism',
94
- 'stance': 1}
95
-
96
  ```
97
 
98
 
@@ -104,57 +104,56 @@ An example of 'train' looks as follows.
104
  - `stance`: a class label representing the stance the text expresses towards the target. Full tagset with indices:
105
 
106
  ```
107
- 0: "FAVOR",
108
- 1: "AGAINST",
109
- 2: "NONE",
 
110
  ```
111
 
112
  ### Data Splits
113
 
114
  | name |train|
115
  |---------|----:|
116
- |zulu_stance|1343 sentences|
117
 
118
  ## Dataset Creation
119
 
120
  ### Curation Rationale
121
 
122
- To enable stance detection in Zulu and also to measure domain transfer in translation
123
 
124
  ### Source Data
125
 
126
  #### Initial Data Collection and Normalization
127
 
128
- The original data is taken from [Semeval2016 task 6: Detecting stance in tweets.](https://aclanthology.org/S16-1003/),
129
- and then translated manually to Zulu.
130
 
131
  #### Who are the source language producers?
132
 
133
- English-speaking Twitter users.
134
 
135
  ### Annotations
136
 
137
  #### Annotation process
138
 
139
- See [Semeval2016 task 6: Detecting stance in tweets.](https://aclanthology.org/S16-1003/); the annotations are taken from there.
140
 
141
  #### Who are the annotators?
142
 
143
- See [Semeval2016 task 6: Detecting stance in tweets.](https://aclanthology.org/S16-1003/); the annotations are taken from there.
144
 
145
  ### Personal and Sensitive Information
146
 
147
- The data was public at the time of collection. User names are preserved.
148
 
149
  ## Considerations for Using the Data
150
 
151
  ### Social Impact of Dataset
152
 
153
- There's a risk of user-deleted content being in this data. The data has NOT been vetted for any content, so there's a risk of [harmful text](https://arxiv.org/abs/2204.14256) content.
154
 
155
  ### Discussion of Biases
156
 
157
- While the data is in Zulu, the source text is not from or about Zulu-speakers, and so still expresses the social biases and topics found in English-speaking Twitter users. Further, some of the topics are USA-specific. The sentiments and ideas in this dataset do not represent Zulu speakers.
158
 
159
  ### Other Known Limitations
160
 
@@ -173,11 +172,13 @@ The authors distribute this data under Creative Commons attribution license, CC-
173
  ### Citation Information
174
 
175
  ```
176
- @inproceedings{dlamini_zulu_stance,
177
- title={Bridging the Domain Gap for Stance Detection for the Zulu language},
178
- author={Dlamini, Gcinizwe and Bekkouch, Imad Eddine Ibrahim and Khan, Adil and Derczynski, Leon},
179
- booktitle={Proceedings of IEEE IntelliSys},
180
- year={2022}
 
 
181
  }
182
  ```
183
 
 
10
  multilinguality:
11
  - monolingual
12
  size_categories:
13
+ - n<1K
14
  source_datasets:
15
  - original
16
  task_categories:
 
80
 
81
  #### zulu_stance
82
 
83
+ - **Size of downloaded dataset files:** 349.79 KiB
84
+ - **Size of the generated dataset:** 366.11 KiB
85
+ - **Total amount of disk used:** 715.90 KiB
86
 
87
  An example of 'train' looks as follows.
88
 
89
  ```
90
  {
91
  'id': '0',
92
+ 'text': 'Волки, волки!!',
93
+ 'title': 'Минобороны обвинило «гражданского сотрудника» в публикации скриншота из игры вместо фото террористов. И показало новое «неоспоримое подтверждение»',
94
+ 'stance': 3
95
+ }
96
  ```
97
 
98
 
 
104
  - `stance`: a class label representing the stance the text expresses towards the target. Full tagset with indices:
105
 
106
  ```
107
+ 0: "support",
108
+ 1: "deny",
109
+ 2: "query",
110
+ 3: "comment",
111
  ```
112
 
113
  ### Data Splits
114
 
115
  | name |train|
116
  |---------|----:|
117
+ |rustance|958 sentences|
118
 
119
  ## Dataset Creation
120
 
121
  ### Curation Rationale
122
 
123
+ Toy data for training and especially evaluating stance prediction in Russian
124
 
125
  ### Source Data
126
 
127
  #### Initial Data Collection and Normalization
128
 
129
+ The data is comments scraped from a Russian news site not situated in Russia, [Meduza](https://meduza.io/), in 2018.
 
130
 
131
  #### Who are the source language producers?
132
 
133
+ Russian speakers including from the Russian diaspora, especially Latvia
134
 
135
  ### Annotations
136
 
137
  #### Annotation process
138
 
139
+ Annotators labelled comments for supporting, denying, querying or just commenting on a news article.
140
 
141
  #### Who are the annotators?
142
 
143
+ Russian native speakers, IT education, male, 20s.
144
 
145
  ### Personal and Sensitive Information
146
 
147
+ The data was public at the time of collection. No PII removal has been performed.
148
 
149
  ## Considerations for Using the Data
150
 
151
  ### Social Impact of Dataset
152
 
153
+ There's a risk of misinformative content being in this data. The data has NOT been vetted for any content, so there's a risk of [harmful text](https://arxiv.org/abs/2204.14256) content.
154
 
155
  ### Discussion of Biases
156
 
 
157
 
158
  ### Other Known Limitations
159
 
 
172
  ### Citation Information
173
 
174
  ```
175
+ @inproceedings{lozhnikov2018stance,
176
+ title={Stance prediction for russian: data and analysis},
177
+ author={Lozhnikov, Nikita and Derczynski, Leon and Mazzara, Manuel},
178
+ booktitle={International Conference in Software Engineering for Defence Applications},
179
+ pages={176--186},
180
+ year={2018},
181
+ organization={Springer}
182
  }
183
  ```
184
 
rustance.py CHANGED
@@ -16,7 +16,7 @@
16
  # Lint as: python3
17
  """Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition"""
18
 
19
- import json
20
  import os
21
 
22
  import datasets
@@ -26,54 +26,42 @@ logger = datasets.logging.get_logger(__name__)
26
 
27
 
28
  _CITATION = """\
29
- @inproceedings{dlamini_zulu_stance,
30
- title={Bridging the Domain Gap for Stance Detection for the Zulu language},
31
- author={Dlamini, Gcinizwe and Bekkouch, Imad Eddine Ibrahim and Khan, Adil and Derczynski, Leon},
32
- booktitle={Proceedings of IEEE IntelliSys},
33
- year={2022}
 
 
34
  }
35
  """
36
 
37
  _DESCRIPTION = """\
38
- This is a stance detection dataset in the Zulu language. The data is translated to Zulu by Zulu native speakers, from English source texts.
39
-
40
- Misinformation has become a major concern in recent last years given its
41
- spread across our information sources. In the past years, many NLP tasks have
42
- been introduced in this area, with some systems reaching good results on
43
- English language datasets. Existing AI based approaches for fighting
44
- misinformation in literature suggest automatic stance detection as an integral
45
- first step to success. Our paper aims at utilizing this progress made for
46
- English to transfers that knowledge into other languages, which is a
47
- non-trivial task due to the domain gap between English and the target
48
- languages. We propose a black-box non-intrusive method that utilizes techniques
49
- from Domain Adaptation to reduce the domain gap, without requiring any human
50
- expertise in the target language, by leveraging low-quality data in both a
51
- supervised and unsupervised manner. This allows us to rapidly achieve similar
52
- results for stance detection for the Zulu language, the target language in
53
- this work, as are found for English. We also provide a stance detection dataset
54
- in the Zulu language.
55
  """
56
 
57
- _URL = "ZUstance.json"
58
 
59
 
60
- class ZuluStanceConfig(datasets.BuilderConfig):
61
- """BuilderConfig for ZuluStance"""
62
 
63
  def __init__(self, **kwargs):
64
- """BuilderConfig ZuluStance.
65
 
66
  Args:
67
  **kwargs: keyword arguments forwarded to super.
68
  """
69
- super(ZuluStanceConfig, self).__init__(**kwargs)
70
 
71
 
72
- class ZuluStance(datasets.GeneratorBasedBuilder):
73
- """ZuluStance dataset."""
74
 
75
  BUILDER_CONFIGS = [
76
- ZuluStanceConfig(name="zulu-stance", version=datasets.Version("1.0.0"), description="Stance dataset in Zulu"),
77
  ]
78
 
79
  def _info(self):
@@ -83,18 +71,19 @@ class ZuluStance(datasets.GeneratorBasedBuilder):
83
  {
84
  "id": datasets.Value("string"),
85
  "text": datasets.Value("string"),
86
- "target": datasets.Value("string"),
87
  "stance": datasets.features.ClassLabel(
88
  names=[
89
- "FAVOR",
90
- "AGAINST",
91
- "NONE",
 
92
  ]
93
  )
94
  }
95
  ),
96
  supervised_keys=None,
97
- homepage="https://arxiv.org/abs/2205.03153",
98
  citation=_CITATION,
99
  )
100
 
@@ -109,12 +98,22 @@ class ZuluStance(datasets.GeneratorBasedBuilder):
109
  def _generate_examples(self, filepath):
110
  logger.info("⏳ Generating examples from = %s", filepath)
111
  with open(filepath, encoding="utf-8") as f:
 
112
  guid = 0
113
- zustance_dataset = json.load(f)
114
- for instance in zustance_dataset:
115
  instance["id"] = str(guid)
116
- instance["text"] = instance.pop("Tweet")
117
- instance["target"] = instance.pop("Target")
 
 
 
 
 
 
 
 
 
118
  instance["stance"] = instance.pop("Stance")
 
119
  yield guid, instance
120
  guid += 1
 
16
  # Lint as: python3
17
  """Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition"""
18
 
19
+ import csv
20
  import os
21
 
22
  import datasets
 
26
 
27
 
28
  _CITATION = """\
29
+ @inproceedings{lozhnikov2018stance,
30
+ title={Stance prediction for russian: data and analysis},
31
+ author={Lozhnikov, Nikita and Derczynski, Leon and Mazzara, Manuel},
32
+ booktitle={International Conference in Software Engineering for Defence Applications},
33
+ pages={176--186},
34
+ year={2018},
35
+ organization={Springer}
36
  }
37
  """
38
 
39
  _DESCRIPTION = """\
40
+ This is a stance prediction dataset in Russian. The dataset contains comments on news articles,
41
+ and rows are a comment, the title of the news article it responds to, and the stance of the comment
42
+ towards the article.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  """
44
 
45
+ _URL = "rustance_dataset.csv"
46
 
47
 
48
+ class RuStanceConfig(datasets.BuilderConfig):
49
+ """BuilderConfig for RuStance"""
50
 
51
  def __init__(self, **kwargs):
52
+ """BuilderConfig RuStance.
53
 
54
  Args:
55
  **kwargs: keyword arguments forwarded to super.
56
  """
57
+ super(RuStanceConfig, self).__init__(**kwargs)
58
 
59
 
60
+ class RuStance(datasets.GeneratorBasedBuilder):
61
+ """RuStance dataset."""
62
 
63
  BUILDER_CONFIGS = [
64
+ RuStanceConfig(name="rustance", version=datasets.Version("1.0.0"), description="Stance dataset in Russian"),
65
  ]
66
 
67
  def _info(self):
 
71
  {
72
  "id": datasets.Value("string"),
73
  "text": datasets.Value("string"),
74
+ "title": datasets.Value("string"),
75
  "stance": datasets.features.ClassLabel(
76
  names=[
77
+ "support",
78
+ "deny",
79
+ "query",
80
+ "comment",
81
  ]
82
  )
83
  }
84
  ),
85
  supervised_keys=None,
86
+ homepage="https://link.springer.com/chapter/10.1007/978-3-030-14687-0_16",
87
  citation=_CITATION,
88
  )
89
 
 
98
  def _generate_examples(self, filepath):
99
  logger.info("⏳ Generating examples from = %s", filepath)
100
  with open(filepath, encoding="utf-8") as f:
101
+ rustance_reader = csv.DictReader(f, delimiter=";", quotechar='"')
102
  guid = 0
103
+ for instance in rustance_reader:
 
104
  instance["id"] = str(guid)
105
+ if instance['Stance'] == "s":
106
+ instance['Stance'] = "support"
107
+ elif instance['Stance'] == "d":
108
+ instance['Stance'] = "deny"
109
+ elif instance['Stance'] == "q":
110
+ instance['Stance'] = "query"
111
+ elif instance['Stance'] == "c":
112
+ instance['Stance'] = "comment"
113
+
114
+ instance["text"] = instance.pop("Text")
115
+ instance["title"] = instance.pop("Title")
116
  instance["stance"] = instance.pop("Stance")
117
+
118
  yield guid, instance
119
  guid += 1