Datasets:
complete the readme, fill in the loader
Browse files- README.md +27 -26
- rustance.py +39 -40
README.md
CHANGED
@@ -10,7 +10,7 @@ licenses:
|
|
10 |
multilinguality:
|
11 |
- monolingual
|
12 |
size_categories:
|
13 |
-
-
|
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:**
|
84 |
-
- **Size of the generated dataset:**
|
85 |
-
- **Total amount of disk used:**
|
86 |
|
87 |
An example of 'train' looks as follows.
|
88 |
|
89 |
```
|
90 |
{
|
91 |
'id': '0',
|
92 |
-
'text': '
|
93 |
-
'
|
94 |
-
'stance':
|
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: "
|
108 |
-
1: "
|
109 |
-
2: "
|
|
|
110 |
```
|
111 |
|
112 |
### Data Splits
|
113 |
|
114 |
| name |train|
|
115 |
|---------|----:|
|
116 |
-
|
|
117 |
|
118 |
## Dataset Creation
|
119 |
|
120 |
### Curation Rationale
|
121 |
|
122 |
-
|
123 |
|
124 |
### Source Data
|
125 |
|
126 |
#### Initial Data Collection and Normalization
|
127 |
|
128 |
-
The
|
129 |
-
and then translated manually to Zulu.
|
130 |
|
131 |
#### Who are the source language producers?
|
132 |
|
133 |
-
|
134 |
|
135 |
### Annotations
|
136 |
|
137 |
#### Annotation process
|
138 |
|
139 |
-
|
140 |
|
141 |
#### Who are the annotators?
|
142 |
|
143 |
-
|
144 |
|
145 |
### Personal and Sensitive Information
|
146 |
|
147 |
-
The data was public at the time of collection.
|
148 |
|
149 |
## Considerations for Using the Data
|
150 |
|
151 |
### Social Impact of Dataset
|
152 |
|
153 |
-
There's a risk of
|
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{
|
177 |
-
title={
|
178 |
-
author={
|
179 |
-
booktitle={
|
180 |
-
|
|
|
|
|
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
|
20 |
import os
|
21 |
|
22 |
import datasets
|
@@ -26,54 +26,42 @@ logger = datasets.logging.get_logger(__name__)
|
|
26 |
|
27 |
|
28 |
_CITATION = """\
|
29 |
-
@inproceedings{
|
30 |
-
title={
|
31 |
-
author={
|
32 |
-
booktitle={
|
33 |
-
|
|
|
|
|
34 |
}
|
35 |
"""
|
36 |
|
37 |
_DESCRIPTION = """\
|
38 |
-
This is a stance
|
39 |
-
|
40 |
-
|
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 = "
|
58 |
|
59 |
|
60 |
-
class
|
61 |
-
"""BuilderConfig for
|
62 |
|
63 |
def __init__(self, **kwargs):
|
64 |
-
"""BuilderConfig
|
65 |
|
66 |
Args:
|
67 |
**kwargs: keyword arguments forwarded to super.
|
68 |
"""
|
69 |
-
super(
|
70 |
|
71 |
|
72 |
-
class
|
73 |
-
"""
|
74 |
|
75 |
BUILDER_CONFIGS = [
|
76 |
-
|
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 |
-
"
|
87 |
"stance": datasets.features.ClassLabel(
|
88 |
names=[
|
89 |
-
"
|
90 |
-
"
|
91 |
-
"
|
|
|
92 |
]
|
93 |
)
|
94 |
}
|
95 |
),
|
96 |
supervised_keys=None,
|
97 |
-
homepage="https://
|
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 |
-
|
114 |
-
for instance in zustance_dataset:
|
115 |
instance["id"] = str(guid)
|
116 |
-
instance[
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|