leondz commited on
Commit
7fd1d70
1 Parent(s): 37bd7bf

add reader, info, readme

Browse files
Files changed (4) hide show
  1. README.md +187 -0
  2. dataset_infos.json +1 -0
  3. rustance.py +120 -0
  4. rustance_dataset.csv +0 -0
README.md ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert_generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - ru
8
+ licenses:
9
+ - cc-by-4.0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1K<n<10K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text_classification
18
+ task_ids:
19
+ - fact_checking
20
+ - sentiment-classification
21
+ paperswithcode_id:
22
+ pretty_name: RuStance
23
+ ---
24
+
25
+ # Dataset Card for "rustance"
26
+
27
+ ## Table of Contents
28
+ - [Dataset Description](#dataset-description)
29
+ - [Dataset Summary](#dataset-summary)
30
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
31
+ - [Languages](#languages)
32
+ - [Dataset Structure](#dataset-structure)
33
+ - [Data Instances](#data-instances)
34
+ - [Data Fields](#data-fields)
35
+ - [Data Splits](#data-splits)
36
+ - [Dataset Creation](#dataset-creation)
37
+ - [Curation Rationale](#curation-rationale)
38
+ - [Source Data](#source-data)
39
+ - [Annotations](#annotations)
40
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
41
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
42
+ - [Social Impact of Dataset](#social-impact-of-dataset)
43
+ - [Discussion of Biases](#discussion-of-biases)
44
+ - [Other Known Limitations](#other-known-limitations)
45
+ - [Additional Information](#additional-information)
46
+ - [Dataset Curators](#dataset-curators)
47
+ - [Licensing Information](#licensing-information)
48
+ - [Citation Information](#citation-information)
49
+ - [Contributions](#contributions)
50
+
51
+ ## Dataset Description
52
+
53
+ - **Homepage:** [https://arxiv.org/abs/2205.03153](https://arxiv.org/abs/2205.03153)
54
+ - **Repository:**
55
+ - **Paper:** [https://arxiv.org/pdf/2205.03153](https://arxiv.org/pdf/2205.03153)
56
+ - **Point of Contact:** [Leon Derczynski](https://github.com/leondz)
57
+ - **Size of downloaded dataset files:** 212.54 KiB
58
+ - **Size of the generated dataset:** 186.76 KiB
59
+ - **Total amount of disk used:** 399.30KiB
60
+
61
+ ### Dataset Summary
62
+
63
+ This is a stance prediction dataset in Russian. The dataset contains comments on news articles,
64
+ and rows are a comment, the title of the news article it responds to, and the stance of the comment
65
+ towards the article.
66
+
67
+ Stance detection is a critical component of rumour and fake news identification. It involves the extraction of the stance a particular author takes related to a given claim, both expressed in text. This paper investigates stance classification for Russian. It introduces a new dataset, RuStance, of Russian tweets and news comments from multiple sources, covering multiple stories, as well as text classification approaches to stance detection as benchmarks over this data in this language. As well as presenting this openly-available dataset, the first of its kind for Russian, the paper presents a baseline for stance prediction in the language.
68
+
69
+ ### Supported Tasks and Leaderboards
70
+
71
+ *
72
+
73
+ ### Languages
74
+
75
+ Russian, as spoken on the Meduza website (i.e. from multiple countries) (`bcp47:ru`)
76
+
77
+ ## Dataset Structure
78
+
79
+ ### Data Instances
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
+
99
+ ### Data Fields
100
+
101
+ - `id`: a `string` feature.
102
+ - `text`: a `string` expressing a stance.
103
+ - `title`: a `string` of the target/topic annotated here.
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
+
161
+ The above limitations apply.
162
+
163
+ ## Additional Information
164
+
165
+ ### Dataset Curators
166
+
167
+ The dataset is curated by the paper's authors.
168
+
169
+ ### Licensing Information
170
+
171
+ The authors distribute this data under Creative Commons attribution license, CC-BY 4.0.
172
+
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
+
184
+
185
+ ### Contributions
186
+
187
+ Author-added dataset [@leondz](https://github.com/leondz)
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"rustance": {"description": "This is a stance prediction dataset in Russian. The dataset contains comments on news articles,\nand rows are a comment, the title of the news article it responds to, and the stance of the comment\ntowards the article.\n", "citation": "@inproceedings{lozhnikov2018stance,\n title={Stance prediction for russian: data and analysis},\n author={Lozhnikov, Nikita and Derczynski, Leon and Mazzara, Manuel},\n booktitle={International Conference in Software Engineering for Defence Applications},\n pages={176--186},\n year={2018},\n organization={Springer}\n}\n", "homepage": "https://link.springer.com/chapter/10.1007/978-3-030-14687-0_16", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "stance": {"num_classes": 4, "names": ["support", "deny", "query", "comment"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "ru_stance", "config_name": "rustance", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 374901, "num_examples": 958, "dataset_name": "ru_stance"}}, "download_checksums": {"rustance_dataset.csv": {"num_bytes": 358180, "checksum": "4177b149fa9976143c5aa40e4faf1859c7915e8d8965e1c82d0d93df5e73fd41"}}, "download_size": 358180, "post_processing_size": null, "dataset_size": 374901, "size_in_bytes": 733081}}
rustance.py ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 HuggingFace Datasets Authors.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
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
23
+
24
+
25
+ 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):
80
+ return datasets.DatasetInfo(
81
+ description=_DESCRIPTION,
82
+ features=datasets.Features(
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
+
101
+ def _split_generators(self, dl_manager):
102
+ """Returns SplitGenerators."""
103
+ downloaded_file = dl_manager.download_and_extract(_URL)
104
+
105
+ return [
106
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_file}),
107
+ ]
108
+
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
rustance_dataset.csv ADDED
The diff for this file is too large to render. See raw diff