Datasets:

Languages:
Catalan
Multilinguality:
monolingual
Size Categories:
unknown
Language Creators:
found
Annotations Creators:
expert-generated
License:
ibaucells commited on
Commit
fbf36cb
1 Parent(s): 654ddfc

Upload 5 files

Browse files
Files changed (5) hide show
  1. README.md +26 -48
  2. dev.json +2 -2
  3. tecla.py +66 -21
  4. test.json +2 -2
  5. train.json +2 -2
README.md CHANGED
@@ -24,16 +24,16 @@ task_ids:
24
 
25
  ## Dataset Description
26
 
27
- - **Website:** https://zenodo.org/record/4761505
28
- - **Paper:** [Are Multilingual Models the Best Choice for Moderately Under-resourced Languages? A Comprehensive Assessment for Catalan](https://arxiv.org/abs/2107.07903)
29
-
30
- - **Point of Contact:** [Carlos Rodríguez-Penagos](carlos.rodriguez1@bsc.es) and [Carme Armentano-Oller](carme.armentano@bsc.es)
31
 
32
 
33
 
34
  ### Dataset Summary
35
 
36
- TeCla (Text Classification) is a Catalan News corpus for thematic Text Classification tasks. It contains 153.265 articles classified under 30 different categories.
 
 
37
 
38
  This dataset was developed by [BSC TeMU](https://temu.bsc.es/) as part of [Projecte AINA](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina/), to enrich the [Catalan Language Understanding Benchmark (CLUB)](https://club.aina.bsc.es/).
39
 
@@ -53,17 +53,21 @@ Three json files, one for each split.
53
 
54
  ### Data Fields
55
 
56
- We used a simple model with the article text and associated labels, without further metadata.
 
 
 
57
 
58
  #### Example:
59
 
60
  <pre>
61
- {"version": "1.0",
62
  "data":
63
  [
64
  {
65
- 'sentence': 'L\'editorial valenciana Media Vaca, Premi Nacional a la Millor Tasca Editorial Cultural del 2018. El jurat en destaca la cura "exquisida" del catàleg, la qualitat dels llibres i el "respecte" pels lectors. ACN Madrid.-L\'editorial valenciana Media Vaca ha obtingut el Premi Nacional a la Millor Labor Editorial Cultural corresponent a l\'any 2018 que atorga el Ministeri de Cultura i Esports. El guardó pretén distingir la tasca editorial d\'una persona física o jurídica que hagi destacat per l\'aportació a la vida cultural espanyola. El premi és de caràcter honorífic i no dotació econòmica. En el cas de Media Vaca, fundada pel valencià Vicente Ferrer i la bilbaïna Begoña Lobo, el jurat n\'ha destacat la cura "exquisida" del catàleg, la qualitat dels llibres i el "respecte" pels lectors i per la resta d\'agents de la cadena del llibre. Media Vaca va publicar els primers llibres el desembre del 1998. El catàleg actual el componen 64 títols dividits en sis col·leccions, que barregen ficció i no ficció. Des del Ministeri de Cultura es destaca que la il·lustració un pes "fonamental" als productes de l\'editorial i que la majoria de projectes solen partir de propostes literàries i textos preexistents. L\'editorial ha rebut quatre vegades el Bologna Ragazzi Award. És l\'única editorial estatal que ha aconseguit el guardó que atorga la Fira del Llibre per a Nens de Bolonya, la més important del sector.',
66
- 'label': 'Lletres'
 
67
  },
68
  ...
69
  ]
@@ -74,13 +78,15 @@ We used a simple model with the article text and associated labels, without furt
74
 
75
  #### Labels
76
 
77
- 'Societat', 'Política', 'Turisme', 'Salut', 'Economia', 'Successos', 'Partits', 'Educació', 'Policial', 'Medi ambient', 'Parlament', 'Empresa', 'Judicial', 'Unió Europea', 'Comerç', 'Cultura', 'Cinema', 'Govern', 'Lletres', 'Infraestructures', 'Música', 'Festa i cultura popular', 'Teatre', 'Mobilitat', 'Govern espanyol', 'Equipaments i patrimoni', 'Meteorologia', 'Treball', 'Trànsit', 'Món'
 
78
 
79
  ### Data Splits
80
 
81
- * train.json: 110203 article-label pairs
82
- * dev.json: 13786 article-label pairs
83
- * test.json: 13786 article-label pairs
 
84
 
85
  ## Dataset Creation
86
 
@@ -96,9 +102,10 @@ The source data are crawled articles from the Catalan News Agency ([Agència Cat
96
 
97
  We crawled 219.586 articles from the Catalan News Agency ([Agència Catalana de Notícies; ACN](https://www.acn.cat/)) newswire archive, the latest from October 11, 2020.
98
 
99
- We used the "subsection" category as a classification label, after excluding territorial labels (see [territorial_labels.txt](https://huggingface.co/datasets/projecte-aina/tecla/blob/main/territorial_labels.txt) file) and labels with less than 2000 occurrences.
 
 
100
 
101
- With this criteria compiled a total of 153.265 articles for this text classification dataset.
102
 
103
  #### Who are the source language producers?
104
 
@@ -108,11 +115,11 @@ The Catalan News Agency ([Agència Catalana de Notícies; ACN](https://www.acn.c
108
 
109
  #### Annotation process
110
 
111
- We used the "subsection" category as a classification label, after excluding territorial labels (see [territorial_labels.txt](https://huggingface.co/datasets/projecte-aina/tecla/blob/main/territorial_labels.txt) file) and labels with less than 2000 occurrences.
112
 
113
  #### Who are the annotators?
114
 
115
- Editorial staff classified the articles under the different thematic sections, and we extracted these from metadata.
116
 
117
  ### Personal and Sensitive Information
118
 
@@ -136,7 +143,7 @@ We hope this dataset contributes to the development of language models in Catala
136
 
137
  ### Dataset Curators
138
 
139
- Text Mining Unit (TeMU) at the Barcelona Supercomputing Center (bsc-temu@bsc.es)
140
 
141
  This work was funded by the [Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya](https://politiquesdigitals.gencat.cat/ca/inici/index.html#googtrans(ca|en) within the framework of [Projecte AINA](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina).
142
 
@@ -147,34 +154,5 @@ This work is licensed under a <a rel="license" href="https://creativecommons.org
147
 
148
  ### Citation Information
149
 
150
- ```
151
-
152
- @inproceedings{armengol-estape-etal-2021-multilingual,
153
- title = "Are Multilingual Models the Best Choice for Moderately Under-resourced Languages? {A} Comprehensive Assessment for {C}atalan",
154
- author = "Armengol-Estap{\'e}, Jordi and
155
- Carrino, Casimiro Pio and
156
- Rodriguez-Penagos, Carlos and
157
- de Gibert Bonet, Ona and
158
- Armentano-Oller, Carme and
159
- Gonzalez-Agirre, Aitor and
160
- Melero, Maite and
161
- Villegas, Marta",
162
- booktitle = "Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021",
163
- month = aug,
164
- year = "2021",
165
- address = "Online",
166
- publisher = "Association for Computational Linguistics",
167
- url = "https://aclanthology.org/2021.findings-acl.437",
168
- doi = "10.18653/v1/2021.findings-acl.437",
169
- pages = "4933--4946",
170
- }
171
-
172
- ```
173
-
174
-
175
- [DOI](https://doi.org/10.5281/zenodo.4529183)
176
-
177
-
178
- ### Contributions
179
 
180
- [N/A]
24
 
25
  ## Dataset Description
26
 
27
+ - **Website:** [Zenodo](https://zenodo.org/record/7334110)
28
+ - **Point of Contact:** [Irene Baucells de la Peña](irene.baucells@bsc.es), [Carlos Rodríguez-Penagos](carlos.rodriguez1@bsc.es) and [Carme Armentano-Oller](carme.armentano@bsc.es)
 
 
29
 
30
 
31
 
32
  ### Dataset Summary
33
 
34
+ TeCla (Text Classification) is a Catalan News corpus for thematic multi-class Text Classification tasks. The present version (2.0) contains 113.376 articles classified under a hierarchical class structure consisting of a coarse-grained and a fine-grained class. Each of the 4 coarse-grained classes accept a subset of fine-grained ones, 53 in total.
35
+
36
+ The previous version (1.0.1) can still be found at https://zenodo.org/record/4761505
37
 
38
  This dataset was developed by [BSC TeMU](https://temu.bsc.es/) as part of [Projecte AINA](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina/), to enrich the [Catalan Language Understanding Benchmark (CLUB)](https://club.aina.bsc.es/).
39
 
53
 
54
  ### Data Fields
55
 
56
+ Each example contains the following 3 fields:
57
+ * text: the article text (string)
58
+ * label1: the coarse-grained class
59
+ * label2: the fine-grained class
60
 
61
  #### Example:
62
 
63
  <pre>
64
+ {"version": "2.0",
65
  "data":
66
  [
67
  {
68
+ 'sentence': "La setena edició del Festival Fantàstik inclourà les cintes 'Matar a dios' i 'Mandy' i un homenatge a 'Mi vecino Totoro'. Es projectaran 22 curtmetratges seleccionats d'entre més de 500 presentats a nivell internacional. El Centre Cultural de Granollers acull del 8 a l'11 de novembre la setena edició del Festival Fantàstik. El certamen, que s'allargarà un dia, arrencarà amb la projecció de la cinta de Caye Casas i Albert Pide 'Matar a Dios'. Els dos directors estaran presents en la inauguració de la cita. A més, els asssitents podran gaudir de 'Mandy', el darrer treball de Nicolas Cage. Altres llargmetratges seleccionats per aquest any són 'Aterrados' (2017), 'Revenge' (2017), 'A Mata Negra' (2018), 'Top Knot Detective' (2018) i 'La Gran Desfeta' (2018). A més, amb motiu del trentè aniversari de la pel·lícula 'El meu veí Totoro' es durà a terme l'exposició dedicada a aquest film '30 anys 30 artistes' comissariada per Jordi Pastor i Reinaldo Pereira. La mostra '30 anys 30 artistes' recull els treballs de trenta artistes d'estils diferents al voltant de la figura de Totoro i el seu director. Es podrà veure durant els dies de festival i es complementarà amb la projecció de la pel·lícula el diumenge 11 de novembre. Al llarg del festival també es projectaran els 22 curtmetratges prèviament seleccionats d'entre més de 500 presentats a nivell internacional. El millor tindrà una dotació de 1000 euros fruit de la unió de forces amb el Mercat Audiovisual de Catalunya.",
69
+ 'label1': 'Cultura',
70
+ 'label2': 'Cinema'
71
  },
72
  ...
73
  ]
78
 
79
  #### Labels
80
 
81
+ * label1: 'Societat', 'Política', 'Economia', 'Cultura'
82
+ * label2: 'Llengua', 'Infraestructures', 'Arts', 'Parlament', 'Noves tecnologies', 'Castells', 'Successos', 'Empresa', 'Mobilitat', 'Teatre', 'Treball', 'Logística', 'Urbanisme', 'Govern', 'Entitats', 'Finances', 'Govern espanyol', 'Trànsit', 'Indústria', 'Esports', 'Exteriors', 'Medi ambient', 'Habitatge', 'Salut', 'Equipaments i patrimoni', 'Recerca', 'Cooperació', 'Innovació', 'Agroalimentació', 'Policial', 'Serveis Socials', 'Cinema', 'Memòria històrica', 'Turisme', 'Política municipal', 'Comerç', 'Universitats', 'Hisenda', 'Judicial', 'Partits', 'Música', 'Lletres', 'Religió', 'Festa i cultura popular', 'Unió Europea', 'Moda', 'Moviments socials', 'Comptes públics', 'Immigració', 'Educació', 'Gastronomia', 'Meteorologia', 'Energia'
83
 
84
  ### Data Splits
85
 
86
+ Train, development and test splits were created in a stratified fashion, following a 0.8, 0.05 and 0.15 proportion, respectively. The sizes of each split are the following:
87
+ * train.json: 90700 examples
88
+ * dev.json: 5669 examples
89
+ * test.json: 17007 examples
90
 
91
  ## Dataset Creation
92
 
102
 
103
  We crawled 219.586 articles from the Catalan News Agency ([Agència Catalana de Notícies; ACN](https://www.acn.cat/)) newswire archive, the latest from October 11, 2020.
104
 
105
+ From the crawled data, we selected those articles whose 'section' and 'subsection' categories followed the expected codification combinations included in the ACN's style guide and whose 'section' complied the requirements of containing subsections and being thematically founded (in contrast to geographically defined categories such as 'Món' and 'Unió Europea'). The articles originally belonging to the 'Unió Europea' section, which were related to political organisms from the European Union, were included in the 'Política' coarse-grained category (within a fine-grained category named 'Unió Europea') due to its close proximity between some of the original subsections of 'Política' and those of 'Unió Europea', both defined by the specific political organism dealt with in the article.
106
+
107
+ The text field in each example is a concatenation of the original title, subtitle and body of the article (before the concatenation, both title and subtitle were added a final dot whenever they lacked one). The preprocessing of the texts was minimal and consisted in the removal of the pattern "ACN {location}.-" included before the body in each text as well as newlines originally used to divide the text in paragraphs.
108
 
 
109
 
110
  #### Who are the source language producers?
111
 
115
 
116
  #### Annotation process
117
 
118
+ The crawled data contained the categories' annotations, which were then used to create this dataset with the mentioned criteria.
119
 
120
  #### Who are the annotators?
121
 
122
+ Editorial staff classified the articles under the different thematic sections and subsections, and we extracted these from metadata.
123
 
124
  ### Personal and Sensitive Information
125
 
143
 
144
  ### Dataset Curators
145
 
146
+ Irene Baucells (irene.baucells@bsc.es), Casimiro Pio Carrino (casimiro.carrino@bsc.es), Carlos Rodríguez (carlos.rodriguez1@bsc.es) and Carme Armentano (carme.armentano@bsc.es), from [BSC-CNS](https://www.bsc.es/).
147
 
148
  This work was funded by the [Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya](https://politiquesdigitals.gencat.cat/ca/inici/index.html#googtrans(ca|en) within the framework of [Projecte AINA](https://politiquesdigitals.gencat.cat/ca/economia/catalonia-ai/aina).
149
 
154
 
155
  ### Citation Information
156
 
157
+ [DOI]([https://doi.org/10.5281/zenodo.7334110])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
 
dev.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1222f41063baa63ce8139691ab3e7021c19b8ccab3a6cb60d40c35eb93df81a2
3
- size 34946188
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0a9dcf1778992fac105abb1eed1b1e995a29beabd8ecb258a599424833f9e04
3
+ size 14539836
tecla.py CHANGED
@@ -5,9 +5,9 @@ import datasets
5
  logger = datasets.logging.get_logger(__name__)
6
 
7
  _CITATION = """
8
- Carrino, Casimiro Pio, Rodriguez-Penagos, Carlos Gerardo, & Armentano-Oller, Carme. (2021).
9
- TeCla: Text Classification Catalan dataset (Version 1.0) [Data set].
10
- Zenodo. http://doi.org/10.5281/zenodo.4627198
11
  """
12
 
13
  _DESCRIPTION = """
@@ -19,7 +19,7 @@ _DESCRIPTION = """
19
  _HOMEPAGE = """https://zenodo.org/record/4761505"""
20
 
21
  # TODO: upload datasets to github
22
- _URL = "https://huggingface.co/datasets/bsc/tecla/resolve/main/"
23
  _TRAINING_FILE = "train.json"
24
  _DEV_FILE = "dev.json"
25
  _TEST_FILE = "test.json"
@@ -43,7 +43,7 @@ class tecla(datasets.GeneratorBasedBuilder):
43
  teclaConfig(
44
  name="tecla",
45
  version=datasets.Version("1.0.1"),
46
- description="tecla dataset",
47
  ),
48
  ]
49
 
@@ -53,28 +53,71 @@ class tecla(datasets.GeneratorBasedBuilder):
53
  features=datasets.Features(
54
  {
55
  "text": datasets.Value("string"),
56
- "label": datasets.features.ClassLabel
57
  (names=
58
  [
59
- "Medi ambient",
60
  "Societat",
61
- "Policial",
62
- "Judicial",
63
- "Empresa",
64
- "Partits",
65
  "Pol\u00edtica",
66
- "Successos",
67
- "Salut",
 
 
 
 
 
 
68
  "Infraestructures",
 
69
  "Parlament",
70
- "M\u00fasica",
71
- "Govern",
72
- "Uni\u00f3 Europea",
73
- "Economia",
74
  "Mobilitat",
 
75
  "Treball",
76
- "Cultura",
77
- "Educaci\u00f3"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  ]
79
  ),
80
  }
@@ -105,8 +148,10 @@ class tecla(datasets.GeneratorBasedBuilder):
105
  acn_ca = json.load(f)
106
  for id_, article in enumerate(acn_ca["data"]):
107
  text = article["sentence"]
108
- label = article["label"]
 
109
  yield id_, {
110
  "text": text,
111
- "label": label,
 
112
  }
5
  logger = datasets.logging.get_logger(__name__)
6
 
7
  _CITATION = """
8
+ Baucells, Irene, Carrino, Casimiro Pio, Rodriguez-Penagos, Carlos Gerardo, & Armentano-Oller, Carme. (2021).
9
+ TeCla: Text Classification Catalan dataset (Version 2.0) [Data set].
10
+ Zenodo. http://doi.org/10.5281/zenodo.7334110
11
  """
12
 
13
  _DESCRIPTION = """
19
  _HOMEPAGE = """https://zenodo.org/record/4761505"""
20
 
21
  # TODO: upload datasets to github
22
+ _URL = "./"
23
  _TRAINING_FILE = "train.json"
24
  _DEV_FILE = "dev.json"
25
  _TEST_FILE = "test.json"
43
  teclaConfig(
44
  name="tecla",
45
  version=datasets.Version("1.0.1"),
46
+ description="tecla 2.0 dataset",
47
  ),
48
  ]
49
 
53
  features=datasets.Features(
54
  {
55
  "text": datasets.Value("string"),
56
+ "label1": datasets.features.ClassLabel
57
  (names=
58
  [
 
59
  "Societat",
 
 
 
 
60
  "Pol\u00edtica",
61
+ "Economia",
62
+ "Cultura",
63
+ ]
64
+ ),
65
+ "label2": datasets.features.ClassLabel
66
+ (names=
67
+ [
68
+ "Llengua",
69
  "Infraestructures",
70
+ "Arts",
71
  "Parlament",
72
+ "Noves tecnologies",
73
+ "Castells",
74
+ "Successos",
75
+ "Empresa",
76
  "Mobilitat",
77
+ "Teatre",
78
  "Treball",
79
+ "Log\u00edstica",
80
+ "Urbanisme",
81
+ "Govern",
82
+ "Entitats",
83
+ "Finances",
84
+ "Govern espanyol",
85
+ "Tr\u00e0nsit",
86
+ "Ind\u00fastria",
87
+ "Esports",
88
+ "Exteriors",
89
+ "Medi ambient",
90
+ "Habitatge",
91
+ "Salut",
92
+ "Equipaments i patrimoni",
93
+ "Recerca",
94
+ "Cooperaci\u00f3",
95
+ "Innovaci\u00f3",
96
+ "Agroalimentaci\u00f3",
97
+ "Policial",
98
+ "Serveis Socials",
99
+ "Cinema",
100
+ "Mem\u00f2ria hist\u00f2rica",
101
+ "Turisme",
102
+ "Pol\u00edtica municipal",
103
+ "Comer\u00e7",
104
+ "Universitats",
105
+ "Hisenda",
106
+ "Judicial",
107
+ "Partits",
108
+ "M\u00fasica",
109
+ "Lletres",
110
+ "Religi\u00f3",
111
+ "Festa i cultura popular",
112
+ "Uni\u00f3 Europea",
113
+ "Moda",
114
+ "Moviments socials",
115
+ "Comptes p\u00fablics",
116
+ "Immigraci\u00f3",
117
+ "Educaci\u00f3",
118
+ "Gastronomia",
119
+ "Meteorologia",
120
+ "Energia"
121
  ]
122
  ),
123
  }
148
  acn_ca = json.load(f)
149
  for id_, article in enumerate(acn_ca["data"]):
150
  text = article["sentence"]
151
+ label1 = article["label1"]
152
+ label2 = article["label2"]
153
  yield id_, {
154
  "text": text,
155
+ "label1": label1,
156
+ "label2": label2,
157
  }
test.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ecd080814ed5e466f33f5a5d64eb85c94c13efe367897174f4546491cade6df8
3
- size 34997197
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7954051e42ed7d97fe0ac0977bc624965fd5af77170c44fffaacdfbb49f472e7
3
+ size 42972092
train.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:13501fd5cbb51cdd3bcefaae305ef1e6f9e74209cc7f6255275535e6d374b67d
3
- size 280571534
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a23c8adb34b5d70b126c1e83d4ea7f998922bd42daa290edb13d657889a5c52
3
+ size 230031411