albertvillanova HF staff commited on
Commit
cf24d44
1 Parent(s): 5deb408

Convert dataset to Parquet (#3)

Browse files

- Convert dataset to Parquet (0a5e570a2e38cdded020de3558a76cd494c2cc02)
- Add spanish data files (7dd6f2f397104c955f8ffac25f732938ef8ddcee)
- Delete loading script (5727a4c8fce9f637f166e3e5cda6999eab1fc2ff)
- Delete legacy dataset_infos.json (bb8425573bce3d0a68fbd2241ec37a21d050b453)

README.md CHANGED
@@ -19,6 +19,9 @@ task_categories:
19
  task_ids: []
20
  paperswithcode_id: cic
21
  pretty_name: Catalonia Independence Corpus
 
 
 
22
  tags:
23
  - stance-detection
24
  dataset_info:
@@ -37,16 +40,16 @@ dataset_info:
37
  '2': NEUTRAL
38
  splits:
39
  - name: train
40
- num_bytes: 1406250
41
  num_examples: 6028
42
  - name: test
43
- num_bytes: 469204
44
  num_examples: 2010
45
  - name: validation
46
- num_bytes: 473393
47
  num_examples: 2010
48
- download_size: 995415
49
- dataset_size: 2348847
50
  - config_name: spanish
51
  features:
52
  - name: id_str
@@ -62,19 +65,34 @@ dataset_info:
62
  '2': NEUTRAL
63
  splits:
64
  - name: train
65
- num_bytes: 1507388
66
  num_examples: 6046
67
  - name: test
68
- num_bytes: 501783
69
  num_examples: 2016
70
  - name: validation
71
- num_bytes: 505092
72
  num_examples: 2015
73
- download_size: 1070281
74
- dataset_size: 2514263
75
- config_names:
76
- - catalan
77
- - spanish
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  ---
79
 
80
  # Dataset Card for Catalonia Independence Corpus
19
  task_ids: []
20
  paperswithcode_id: cic
21
  pretty_name: Catalonia Independence Corpus
22
+ config_names:
23
+ - catalan
24
+ - spanish
25
  tags:
26
  - stance-detection
27
  dataset_info:
40
  '2': NEUTRAL
41
  splits:
42
  - name: train
43
+ num_bytes: 1406242
44
  num_examples: 6028
45
  - name: test
46
+ num_bytes: 469196
47
  num_examples: 2010
48
  - name: validation
49
+ num_bytes: 473385
50
  num_examples: 2010
51
+ download_size: 1638682
52
+ dataset_size: 2348823
53
  - config_name: spanish
54
  features:
55
  - name: id_str
65
  '2': NEUTRAL
66
  splits:
67
  - name: train
68
+ num_bytes: 1507380
69
  num_examples: 6046
70
  - name: test
71
+ num_bytes: 501775
72
  num_examples: 2016
73
  - name: validation
74
+ num_bytes: 505084
75
  num_examples: 2015
76
+ download_size: 1760636
77
+ dataset_size: 2514239
78
+ configs:
79
+ - config_name: catalan
80
+ data_files:
81
+ - split: train
82
+ path: catalan/train-*
83
+ - split: test
84
+ path: catalan/test-*
85
+ - split: validation
86
+ path: catalan/validation-*
87
+ default: true
88
+ - config_name: spanish
89
+ data_files:
90
+ - split: train
91
+ path: spanish/train-*
92
+ - split: test
93
+ path: spanish/test-*
94
+ - split: validation
95
+ path: spanish/validation-*
96
  ---
97
 
98
  # Dataset Card for Catalonia Independence Corpus
catalan/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a0dd4ca91f61a4f004f5aa4243e38cd168e6df82c54699953105ee6cb178fec
3
+ size 331730
catalan/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edc1ac7867026311d5b5abd1e1058f9eb8d5d3db6421816d8a518726deac7c22
3
+ size 976635
catalan/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55ccbf0537edc7203e6795033cbd14d479d2f797b8e1e59f6f54102ad9d8a3d7
3
+ size 330317
catalonia_independence.py DELETED
@@ -1,120 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
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
- """This dataset contains two corpora in Spanish and Catalan that consist of annotated Twitter messages for automatic stance detection."""
16
-
17
-
18
- import csv
19
- import os
20
-
21
- import datasets
22
-
23
-
24
- _CITATION = """\
25
- @inproceedings{zotova-etal-2020-multilingual,
26
- title = "Multilingual Stance Detection in Tweets: The {C}atalonia Independence Corpus",
27
- author = "Zotova, Elena and
28
- Agerri, Rodrigo and
29
- Nunez, Manuel and
30
- Rigau, German",
31
- booktitle = "Proceedings of the 12th Language Resources and Evaluation Conference",
32
- month = may,
33
- year = "2020",
34
- address = "Marseille, France",
35
- publisher = "European Language Resources Association",
36
- url = "https://www.aclweb.org/anthology/2020.lrec-1.171",
37
- pages = "1368--1375",
38
- abstract = "Stance detection aims to determine the attitude of a given text with respect to a specific topic or claim. While stance detection has been fairly well researched in the last years, most the work has been focused on English. This is mainly due to the relative lack of annotated data in other languages. The TW-10 referendum Dataset released at IberEval 2018 is a previous effort to provide multilingual stance-annotated data in Catalan and Spanish. Unfortunately, the TW-10 Catalan subset is extremely imbalanced. This paper addresses these issues by presenting a new multilingual dataset for stance detection in Twitter for the Catalan and Spanish languages, with the aim of facilitating research on stance detection in multilingual and cross-lingual settings. The dataset is annotated with stance towards one topic, namely, the ndependence of Catalonia. We also provide a semi-automatic method to annotate the dataset based on a categorization of Twitter users. We experiment on the new corpus with a number of supervised approaches, including linear classifiers and deep learning methods. Comparison of our new corpus with the with the TW-1O dataset shows both the benefits and potential of a well balanced corpus for multilingual and cross-lingual research on stance detection. Finally, we establish new state-of-the-art results on the TW-10 dataset, both for Catalan and Spanish.",
39
- language = "English",
40
- ISBN = "979-10-95546-34-4",
41
- }
42
- """
43
-
44
- _DESCRIPTION = """\
45
- This dataset contains two corpora in Spanish and Catalan that consist of annotated Twitter messages for automatic stance detection. The data was collected over 12 days during February and March of 2019 from tweets posted in Barcelona, and during September of 2018 from tweets posted in the town of Terrassa, Catalonia.
46
-
47
- Each corpus is annotated with three classes: AGAINST, FAVOR and NEUTRAL, which express the stance towards the target - independence of Catalonia.
48
- """
49
-
50
- _HOMEPAGE = "https://github.com/ixa-ehu/catalonia-independence-corpus"
51
-
52
- _LICENSE = "CC BY-NC-SA 4.0"
53
-
54
- _URLs = {
55
- "catalan": "https://github.com/ixa-ehu/catalonia-independence-corpus/raw/master/01_CIC_CA.zip",
56
- "spanish": "https://github.com/ixa-ehu/catalonia-independence-corpus/raw/master/02_CIC_ES.zip",
57
- }
58
-
59
-
60
- class CataloniaIndependence(datasets.GeneratorBasedBuilder):
61
- """This dataset contains two corpora in Spanish and Catalan that consist of annotated Twitter messages for automatic stance detection."""
62
-
63
- VERSION = datasets.Version("1.1.0")
64
-
65
- BUILDER_CONFIGS = [
66
- datasets.BuilderConfig(
67
- name="catalan",
68
- version=VERSION,
69
- description="This part of the corpus contains annotated tweets posted in Catalan.",
70
- ),
71
- datasets.BuilderConfig(
72
- name="spanish",
73
- version=VERSION,
74
- description="This part of the corpus contains annotated tweets posted in Spanish.",
75
- ),
76
- ]
77
-
78
- DEFAULT_CONFIG_NAME = "catalan"
79
-
80
- def _info(self):
81
- features = datasets.Features(
82
- {
83
- "id_str": datasets.Value("string"),
84
- "TWEET": datasets.Value("string"),
85
- "LABEL": datasets.ClassLabel(names=["AGAINST", "FAVOR", "NEUTRAL"]),
86
- }
87
- )
88
- return datasets.DatasetInfo(
89
- description=_DESCRIPTION,
90
- features=features,
91
- supervised_keys=None,
92
- homepage=_HOMEPAGE,
93
- license=_LICENSE,
94
- citation=_CITATION,
95
- )
96
-
97
- def _split_generators(self, dl_manager):
98
- data_dir = dl_manager.download_and_extract(_URLs[self.config.name])
99
- return [
100
- datasets.SplitGenerator(
101
- name=datasets.Split.TRAIN,
102
- gen_kwargs={"filepath": os.path.join(data_dir, f"{self.config.name}_train.csv")},
103
- ),
104
- datasets.SplitGenerator(
105
- name=datasets.Split.TEST,
106
- gen_kwargs={"filepath": os.path.join(data_dir, f"{self.config.name}_test.csv")},
107
- ),
108
- datasets.SplitGenerator(
109
- name=datasets.Split.VALIDATION,
110
- gen_kwargs={"filepath": os.path.join(data_dir, f"{self.config.name}_val.csv")},
111
- ),
112
- ]
113
-
114
- def _generate_examples(self, filepath):
115
- with open(filepath, encoding="utf-8") as csv_file:
116
- csv_reader = csv.reader(csv_file, delimiter="\t")
117
- # skip header
118
- next(csv_reader)
119
- for _id, row in enumerate(csv_reader):
120
- yield _id, {"id_str": row[0], "TWEET": row[1], "LABEL": row[2]}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"catalan": {"description": "This dataset contains two corpora in Spanish and Catalan that consist of annotated Twitter messages for automatic stance detection. The data was collected over 12 days during February and March of 2019 from tweets posted in Barcelona, and during September of 2018 from tweets posted in the town of Terrassa, Catalonia.\n\nEach corpus is annotated with three classes: AGAINST, FAVOR and NEUTRAL, which express the stance towards the target - independence of Catalonia.\n", "citation": "@inproceedings{zotova-etal-2020-multilingual,\n title = \"Multilingual Stance Detection in Tweets: The {C}atalonia Independence Corpus\",\n author = \"Zotova, Elena and\n Agerri, Rodrigo and\n Nunez, Manuel and\n Rigau, German\",\n booktitle = \"Proceedings of the 12th Language Resources and Evaluation Conference\",\n month = may,\n year = \"2020\",\n address = \"Marseille, France\",\n publisher = \"European Language Resources Association\",\n url = \"https://www.aclweb.org/anthology/2020.lrec-1.171\",\n pages = \"1368--1375\",\n abstract = \"Stance detection aims to determine the attitude of a given text with respect to a specific topic or claim. While stance detection has been fairly well researched in the last years, most the work has been focused on English. This is mainly due to the relative lack of annotated data in other languages. The TW-10 referendum Dataset released at IberEval 2018 is a previous effort to provide multilingual stance-annotated data in Catalan and Spanish. Unfortunately, the TW-10 Catalan subset is extremely imbalanced. This paper addresses these issues by presenting a new multilingual dataset for stance detection in Twitter for the Catalan and Spanish languages, with the aim of facilitating research on stance detection in multilingual and cross-lingual settings. The dataset is annotated with stance towards one topic, namely, the ndependence of Catalonia. We also provide a semi-automatic method to annotate the dataset based on a categorization of Twitter users. We experiment on the new corpus with a number of supervised approaches, including linear classifiers and deep learning methods. Comparison of our new corpus with the with the TW-1O dataset shows both the benefits and potential of a well balanced corpus for multilingual and cross-lingual research on stance detection. Finally, we establish new state-of-the-art results on the TW-10 dataset, both for Catalan and Spanish.\",\n language = \"English\",\n ISBN = \"979-10-95546-34-4\",\n}\n", "homepage": "https://github.com/ixa-ehu/catalonia-independence-corpus", "license": "CC BY-NC-SA 4.0", "features": {"id_str": {"dtype": "string", "id": null, "_type": "Value"}, "TWEET": {"dtype": "string", "id": null, "_type": "Value"}, "LABEL": {"num_classes": 3, "names": ["AGAINST", "FAVOR", "NEUTRAL"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "catalonia_independence", "config_name": "catalan", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1406250, "num_examples": 6028, "dataset_name": "catalonia_independence"}, "test": {"name": "test", "num_bytes": 469204, "num_examples": 2010, "dataset_name": "catalonia_independence"}, "validation": {"name": "validation", "num_bytes": 473393, "num_examples": 2010, "dataset_name": "catalonia_independence"}}, "download_checksums": {"https://github.com/ixa-ehu/catalonia-independence-corpus/raw/master/01_CIC_CA.zip": {"num_bytes": 995415, "checksum": "c8312c4d1355e414171d166cac5ba3fa97734ebc639b02c2b6f7995cb15c75d9"}}, "download_size": 995415, "post_processing_size": null, "dataset_size": 2348847, "size_in_bytes": 3344262}, "spanish": {"description": "This dataset contains two corpora in Spanish and Catalan that consist of annotated Twitter messages for automatic stance detection. The data was collected over 12 days during February and March of 2019 from tweets posted in Barcelona, and during September of 2018 from tweets posted in the town of Terrassa, Catalonia.\n\nEach corpus is annotated with three classes: AGAINST, FAVOR and NEUTRAL, which express the stance towards the target - independence of Catalonia.\n", "citation": "@inproceedings{zotova-etal-2020-multilingual,\n title = \"Multilingual Stance Detection in Tweets: The {C}atalonia Independence Corpus\",\n author = \"Zotova, Elena and\n Agerri, Rodrigo and\n Nunez, Manuel and\n Rigau, German\",\n booktitle = \"Proceedings of the 12th Language Resources and Evaluation Conference\",\n month = may,\n year = \"2020\",\n address = \"Marseille, France\",\n publisher = \"European Language Resources Association\",\n url = \"https://www.aclweb.org/anthology/2020.lrec-1.171\",\n pages = \"1368--1375\",\n abstract = \"Stance detection aims to determine the attitude of a given text with respect to a specific topic or claim. While stance detection has been fairly well researched in the last years, most the work has been focused on English. This is mainly due to the relative lack of annotated data in other languages. The TW-10 referendum Dataset released at IberEval 2018 is a previous effort to provide multilingual stance-annotated data in Catalan and Spanish. Unfortunately, the TW-10 Catalan subset is extremely imbalanced. This paper addresses these issues by presenting a new multilingual dataset for stance detection in Twitter for the Catalan and Spanish languages, with the aim of facilitating research on stance detection in multilingual and cross-lingual settings. The dataset is annotated with stance towards one topic, namely, the ndependence of Catalonia. We also provide a semi-automatic method to annotate the dataset based on a categorization of Twitter users. We experiment on the new corpus with a number of supervised approaches, including linear classifiers and deep learning methods. Comparison of our new corpus with the with the TW-1O dataset shows both the benefits and potential of a well balanced corpus for multilingual and cross-lingual research on stance detection. Finally, we establish new state-of-the-art results on the TW-10 dataset, both for Catalan and Spanish.\",\n language = \"English\",\n ISBN = \"979-10-95546-34-4\",\n}\n", "homepage": "https://github.com/ixa-ehu/catalonia-independence-corpus", "license": "CC BY-NC-SA 4.0", "features": {"id_str": {"dtype": "string", "id": null, "_type": "Value"}, "TWEET": {"dtype": "string", "id": null, "_type": "Value"}, "LABEL": {"num_classes": 3, "names": ["AGAINST", "FAVOR", "NEUTRAL"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "catalonia_independence", "config_name": "spanish", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1507388, "num_examples": 6046, "dataset_name": "catalonia_independence"}, "test": {"name": "test", "num_bytes": 501783, "num_examples": 2016, "dataset_name": "catalonia_independence"}, "validation": {"name": "validation", "num_bytes": 505092, "num_examples": 2015, "dataset_name": "catalonia_independence"}}, "download_checksums": {"https://github.com/ixa-ehu/catalonia-independence-corpus/raw/master/02_CIC_ES.zip": {"num_bytes": 1070281, "checksum": "eb717f7074d5a7c9ef596049bab890ca8a1bae9ac0bad12ef70dc3ae09f068ab"}}, "download_size": 1070281, "post_processing_size": null, "dataset_size": 2514263, "size_in_bytes": 3584544}}
 
spanish/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aefb478b8c43ceeff4acfc10ae0ab7449398cc65b3f54cd8bf70a3d7ca64dd36
3
+ size 352572
spanish/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71db22204d82aa38d1eee7d4c043c08abd0846d6924898e6fba83f3ad92d54c8
3
+ size 1054097
spanish/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d59e42e216ff16e1326ca4260008c61d0671696c8575235f4669adef2d5296c0
3
+ size 353967