File size: 7,355 Bytes
1e83f6e
a999afe
 
b45fe3f
f4cd32c
 
a999afe
f4cd32c
 
 
 
 
 
 
a999afe
 
 
b45fe3f
 
6f07b88
a999afe
6f07b88
a999afe
5344409
 
f4cd32c
a999afe
f4cd32c
a999afe
f4cd32c
 
 
a999afe
f4cd32c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a999afe
 
f4cd32c
a999afe
f4cd32c
a999afe
f9674d4
 
f4cd32c
a999afe
 
f4cd32c
a999afe
 
2dca8df
 
 
 
 
 
 
 
 
 
 
 
f4cd32c
 
a999afe
f4cd32c
3566962
a999afe
f4cd32c
a999afe
2583146
 
 
 
 
 
3a59c49
2583146
 
 
 
 
 
 
 
 
3a59c49
2583146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a999afe
f4cd32c
a999afe
f4cd32c
6f07b88
a999afe
f4cd32c
1aaef8e
a999afe
f4cd32c
6f07b88
a999afe
f4cd32c
 
a999afe
f4cd32c
b543a5e
a999afe
f4cd32c
a999afe
5344409
a999afe
f4cd32c
a999afe
f4cd32c
 
a999afe
f4cd32c
a999afe
f4cd32c
a999afe
2583146
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
---
license: apache-2.0
datasets:
- projecte-aina/ceil
language:
- ca
metrics:
- type: f1
  value: 0.836
- type: precision
  value: 0.82069
- type: recall
  value: 0.8523
pipeline_tag: token-classification

widget:

- text: "El raper nord-americà Travis Scott ha gravat el videoclip de la seva cançó 'Circus Maximus' amb els Castellers de Vilafranca. Segons ha publicat la 'Revista Castells' i ha confirmat l'Agència Catalana de Notícies (ACN), el rodatge es va fer el 2 de juliol a la Tarraco Arena Plaça (TAP) de Tarragona." 

- text: "Les Guerres Carlines (dites també popularment en català carlinades) foren tres guerres que tingueren lloc a Espanya al segle xix com a expressió militar del moviment polític carlí i que al llarg del segle xix van enfrontar els carlins o carlistes i els seus descendents."

- text: "El Centre de Coordinació de Rescat Marí de la ciutat de Novorossisk, a Crimea, ha confirmat que el petrolier ha patit danys, i ha explicat que el Servei de Salvament Marítim rus ha remolcat el vaixell. El vice-president del Consell de Seguretat de Rússia, Dmitri Medvédev, ha acusat Ucraïna de voler provocar una catàstrofe mediambiental al mar Negre"



---

# Catalan BERTa (RoBERTa-large) finetuned for Named Entity Recognition.

## Table of Contents
<details>
<summary>Click to expand</summary>

- [Model description](#model-description)
- [Intended uses and limitations](#intended-uses-and-limitations)
- [How to Use](#how-to-use)
- [Training](#training)
  - [Training data](#training-data)
  - [Training procedure](#training-procedure)
- [Evaluation](#evaluation)
   - [Variable and metrics](#variable-and-metrics)
   - [Evaluation results](#evaluation-results)
- [Additional information](#addional-information)
  - [Author](#author)
  - [Contact information](#contact-information)
  - [Copyright](#copyright)
  - [Licensing information](#licensing-information)
  - [Funding](#funding)
  - [Citing information](#citing-information)
  - [Disclaimer](#disclaimer))
</details>


## Model description

The **multiner** is a Named Entity Recognition (NER) model for the Catalan language fine-tuned from the [BERTa] model, a [RoBERTa](https://arxiv.org/abs/1907.11692) base model pre-trained on a medium-size corpus collected from publicly available corpora and crawlers (check the BERTa model card for more details).

It has been trained with a dataset that contains 9 main types and 52 subtypes on all kinds of short texts, with almost 59K documents. 

## Intended uses and limitations


## How to use


from transformers import pipeline

```
pipe = pipeline("ner", model="projecte-aina/multiner_ceil")
example = "George Smith Patton fué un general del Ejército de los Estados Unidos en Europa durante la Segunda Guerra Mundial. "

ner_entity_results = pipe(example, aggregation_strategy="simple")
print(ner_entity_results)


```

## Limitations and bias
At the time of submission, no measures have been taken to estimate the bias embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated.

## Training
We used the NERC dataset in Catalan called [Catalan Entity Identification and Linking](https://huggingface.co/datasets/projecte-aina/ceil) for training and evaluation.

## Evaluation 

Accuracy was calculated using the development set, and reflects the non-balanced nature of the dataset.

### Major types

| Type 	| Accuracy 	| num. Instances in dev set 	|
| ------ | ------ | ------ |
| CW * | 0.842 | 4551 |
| GPE | 0.914 | 19751 |
| Other | 0.69 | 2824 |
| building | 0.736 | 2188 |
| event | 0.739 | 3000 |
| location | 0.819 | 3408 |
| organization | 0.895 | 17285 |
| person | 0.903 | 21689 |
| product | 0.64 | 1038 |

*: Cultural Work

### Subtypes

| Type 	| Accuracy 	| num. Instances in dev set	|
| ------ | ------ | ------ |
| CW-broadcastprogram | 0.854 | 765 |
| CW-film | 0.809 | 549 |
| CW-music | 0.862 | 1027 |
| CW-other | 0.495 | 555 |
| CW-painting | 0.654 | 205 |
| CW-writtenart | 0.814 | 1450 |
| GPE | 0.914 | 19751 |
| Other | 0.69 | 2824 |
| building-airport | 0.733 | 176 |
| building-governmentfacility | 0.514 | 72 |
| building-hospital | 0.805 | 113 |
| building-hotel | 0.688 | 32 |
| building-other | 0.726 | 1585 |
| building-religious | 0.0 | 1 |
| building-restaurant | 0.458 | 48 |
| building-shops | 0.206 | 34 |
| building-sportsfacility | 0.74 | 127 |
| event-attack/terrorism/militaryconflict | 0.866 | 411 |
| event-disaster | 0.261 | 23 |
| event-other | 0.695 | 1069 |
| event-political | 0.527 | 444 |
| event-protest | 0.207 | 29 |
| event-sportsevent | 0.822 | 1024 |
| location-bodiesofwater | 0.865 | 673 |
| location-island | 0.457 | 140 |
| location-mountain | 0.781 | 515 |
| location-other | 0.757 | 1602 |
| location-park | 0.581 | 93 |
| location-road/railway/highway/transit | 0.805 | 385 |
| organization-education | 0.868 | 2097 |
| organization-government | 0.905 | 2939 |
| organization-media | 0.888 | 1963 |
| organization-onlinebusiness | 0.538 | 197 |
| organization-other | 0.788 | 4733 |
| organization-politicalparty | 0.956 | 2272 |
| organization-privatecompany | 0.849 | 1809 |
| organization-religious | 0.638 | 210 |
| organization-sportsteam | 0.946 | 1065 |
| person-actor/director | 0.797 | 1480 |
| person-artist/author | 0.853 | 5812 |
| person-athlete | 0.871 | 1306 |
| person-group | 0.485 | 699 |
| person-influencer | 0.0 | 17 |
| person-other | 0.811 | 8444 |
| person-politician | 0.863 | 3259 |
| person-scholar/scientist | 0.728 | 672 |
| product-E-device | 0.51 | 102 |
| product-clothing | 0.222 | 27 |
| product-consumer_good | 0.0 | 20 |
| product-food | 0.673 | 324 |
| product-other | 0.0 | 69 |
| product-software | 0.67 | 382 |
| product-vehicle | 0.825 | 114 |


## Additional information

### Author
Language Technologies Unit (LangTech) at the Barcelona Supercomputing Center (langtech@bsc.es)

### Contact information
For further information, send an email to langtech@bsc.es

### Copyright
Copyright (c) 2023 Language Technologies Unit (LangTech) at Barcelona Supercomputing Center 

### Licensing Information
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)

### Funding
This work/research has been promoted and financed by the Government of Catalonia through the [Aina project](https://projecteaina.cat/).

### Citation information



### Disclaimer

<details>
<summary>Click to expand</summary>

The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.

When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.

In no event shall the owner and creator of the models (BSC – Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties of these models.