ccasimiro commited on
Commit
fda733d
1 Parent(s): bd7ef45

update readme

Browse files
Files changed (1) hide show
  1. README.md +40 -65
README.md CHANGED
@@ -1,59 +1,36 @@
1
  ---
2
-
3
  language:
4
-
5
  - ca
6
-
7
  license: apache-2.0
8
-
9
  tags:
10
-
11
  - "catalan"
12
-
13
- - "part of speech tagging"
14
-
15
- - "pos"
16
-
17
- - "CaText"
18
-
19
- - "Catalan Textual Corpus"
20
-
21
  datasets:
22
-
23
- - "universal_dependencies"
24
-
25
  metrics:
26
-
27
- - f1
28
-
29
- inference:
30
- parameters:
31
- aggregation_strategy: "first"
32
-
33
- model-index:
34
- - name: roberta-base-ca-cased-pos
35
- results:
36
- - task:
37
- type: token-classification
38
- dataset:
39
- type: universal_dependencies
40
- name: Ancora-ca-POS
41
- metrics:
42
- - name: F1
43
- type: f1
44
- value: 0.9893832385244624
45
-
46
  widget:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
- - text: "Em dic Lluïsa i visc a Santa Maria del Camí."
49
-
50
- - text: "L'Aina, la Berta i la Norma són molt amigues."
51
-
52
- - text: "El Martí llegeix el Cavall Fort."
53
 
54
  ---
55
 
56
- # Catalan BERTa (roberta-base-ca) finetuned for Part-of-speech-tagging (POS)
57
 
58
  ## Table of Contents
59
  - [Model Description](#model-description)
@@ -72,11 +49,11 @@ widget:
72
 
73
  ## Model description
74
 
75
- The **roberta-base-ca-cased-pos** is a Part-of-speech-tagging (POS) model for the Catalan language fine-tuned from the roberta-base-ca 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.
76
 
77
  ## Intended Uses and Limitations
78
 
79
- **roberta-base-ca-cased-pos** model can be used to Part-of-speech-tagging (POS) a text. The model is limited by its training dataset and may not generalize well for all use cases.
80
 
81
  ## How to Use
82
 
@@ -84,18 +61,18 @@ Here is how to use this model:
84
 
85
  ```python
86
  from transformers import pipeline
87
- from pprint import pprint
88
-
89
- nlp = pipeline("token-classification", model="projecte-aina/roberta-base-ca-cased-pos")
90
- example = "Em dic Lluïsa i visc a Santa Maria del Camí."
91
-
92
- pos_results = nlp(example)
93
- pprint(pos_results)
94
  ```
 
95
  ## Training
96
 
97
  ### Training data
98
- We used the POS dataset in Catalan from the [Universal Dependencies Treebank](https://huggingface.co/datasets/universal_dependencies) we refer to _Ancora-ca-pos_ for training and evaluation.
99
 
100
  ### Training Procedure
101
  The model was trained with a batch size of 16 and a learning rate of 5e-5 for 5 epochs. We then selected the best checkpoint using the downstream task metric in the corresponding development set and then evaluated it on the test set.
@@ -106,16 +83,16 @@ The model was trained with a batch size of 16 and a learning rate of 5e-5 for 5
106
 
107
  This model was finetuned maximizing F1 score.
108
 
109
- ## Evaluation results
110
- We evaluated the _roberta-base-ca-cased-pos_ on the Ancora-ca-ner test set against standard multilingual and monolingual baselines:
111
 
112
 
113
- | Model | AnCora-Ca-POS (F1) |
114
- | ------------|:-------------|
115
- | roberta-base-ca-cased-pos |**98.93** |
116
- | mBERT | 98.82 |
117
- | XLM-RoBERTa | 98.89 |
118
- | WikiBERT-ca | 97.60 |
119
 
120
  For more details, check the fine-tuning and evaluation scripts in the official [GitHub repository](https://github.com/projecte-aina/club).
121
 
@@ -123,7 +100,7 @@ For more details, check the fine-tuning and evaluation scripts in the official [
123
 
124
  [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
125
 
126
- ## Citation Information
127
  If you use any of these resources (datasets or models) in your work, please cite our latest paper:
128
  ```bibtex
129
  @inproceedings{armengol-estape-etal-2021-multilingual,
@@ -148,11 +125,9 @@ If you use any of these resources (datasets or models) in your work, please cite
148
  ```
149
 
150
  ### Funding
151
-
152
  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).
153
 
154
 
155
-
156
  ## Contributions
157
 
158
- [N/A]
1
  ---
 
2
  language:
 
3
  - ca
 
4
  license: apache-2.0
 
5
  tags:
 
6
  - "catalan"
7
+ - "qa"
 
 
 
 
 
 
 
 
8
  datasets:
9
+ - "xquad-ca"
10
+ - "viquiquad"
 
11
  metrics:
12
+ - "f1"
13
+ - "exact match"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  widget:
15
+ - text: "Quan va començar el Super3?"
16
+ context: "El Super3 o Club Super3 és un univers infantil català creat a partir d'un programa emès per Televisió de Catalunya des del 1991. Està format per un canal de televisió, la revista Súpers!, la Festa dels Súpers i un club que té un milió i mig de socis."
17
+
18
+ - text: "Quants eren els germans Marx?"
19
+ context: "Els germans Marx van ser un grup de còmics dels Estats Units que originàriament estava compost per cinc germans (entre parèntesis els noms artístics): Leonard (Chico), Adolph (Harpo), Julius (Groucho), Milton (Gummo) i Herbert (Zeppo)."
20
+
21
+ - text: "On van ser els Jocs Olímpics de 1992?"
22
+ context: "Els Jocs Olímpics d'estiu de 1992, oficialment Jocs Olímpics de la XXV Olimpíada, es van celebrar a la ciutat de Barcelona entre els dies 25 de juliol i 9 d'agost de 1992. Hi participaren 9.356 atletes (6.652 homes i 2.704 dones) de 169 comitès nacionals, que competiren en 32 esports i 286 especialitats."
23
+
24
+ - text: "Qui va dissenyar la Sagrada Família?"
25
+ context: "El Temple Expiatori de la Sagrada Família, conegut habitualment com la Sagrada Família, és una basílica catòlica situada a la ciutat de Barcelona. És un dels exemples més coneguts del modernisme català i un edifici únic al món, que ha esdevingut tot un símbol de la ciutat. Obra inacabada de l'arquitecte català Antoni Gaudí, és al barri de la Sagrada Família, al districte de l'Eixample de la ciutat."
26
+
27
+ - text: "Quin és el tercer volcà més gran de la Terra?"
28
+ context: "El Teide (o Pic del Teide) és un estratovolcà i muntanya de Tenerife, Illes Canàries (28.27 N, 16.6 O). Amb una altitud de 3718 m sobre el nivell del mar i amb aproximadament uns 7000 m sobre el llit marí adjacent, és la muntanya més alta d'Espanya, la muntanya més alta de totes les illes atlàntiques i el tercer volcà més gran de la Terra."
29
 
 
 
 
 
 
30
 
31
  ---
32
 
33
+ # Catalan BERTa (roberta-base-ca) finetuned for Question Answering.
34
 
35
  ## Table of Contents
36
  - [Model Description](#model-description)
49
 
50
  ## Model description
51
 
52
+ The **roberta-base-ca-cased-qa** is a Question Answering (QA) model for the Catalan language fine-tuned from the roberta-base-ca 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.
53
 
54
  ## Intended Uses and Limitations
55
 
56
+ **roberta-base-ca-cased-qa** model can be used for extractive question answering. The model is limited by its training dataset and may not generalize well for all use cases.
57
 
58
  ## How to Use
59
 
61
 
62
  ```python
63
  from transformers import pipeline
64
+ nlp = pipeline("question-answering", model="projecte-aina/roberta-base-ca-cased-qa")
65
+ text = "Quan va començar el Super3?"
66
+ context = "El Super3 o Club Super3 és un univers infantil català creat a partir d'un programa emès per Televisió de Catalunya des del 1991. Està format per un canal de televisió, la revista Súpers!, la Festa dels Súpers i un club que té un milió i mig de socis."
67
+
68
+ qa_results = nlp(text, context)
69
+ print(qa_results)
 
70
  ```
71
+
72
  ## Training
73
 
74
  ### Training data
75
+ We used the QA dataset in Catalan called [CatalanQA](https://huggingface.co/datasets/projecte-aina/catalanqa) for training and evaluation, and the [XQuAD-ca](https://huggingface.co/datasets/projecte-aina/xquad-ca) test set for evaluation.
76
 
77
  ### Training Procedure
78
  The model was trained with a batch size of 16 and a learning rate of 5e-5 for 5 epochs. We then selected the best checkpoint using the downstream task metric in the corresponding development set and then evaluated it on the test set.
83
 
84
  This model was finetuned maximizing F1 score.
85
 
86
+ ### Evaluation results
87
+ We evaluated the _roberta-base-ca-cased-qa_ on the CatalanQA and XQuAD-ca test sets against standard multilingual and monolingual baselines:
88
 
89
 
90
+ | Model | ViquiQuAD (F1/EM) | XQuAD-ca (F1/EM) |
91
+ | ------------|:-------------:| -----:|
92
+ | roberta-base-ca-cased-qa | **86.99/73.25** | **67.81/49.43** |
93
+ | mBERT | 86.97/72.22 | 67.15/46.51 |
94
+ | XLM-RoBERTa | 85.50/70.47 | 67.10/46.42 |
95
+ | WikiBERT-ca | 85.45/70.75 | 65.21/36.60 |
96
 
97
  For more details, check the fine-tuning and evaluation scripts in the official [GitHub repository](https://github.com/projecte-aina/club).
98
 
100
 
101
  [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
102
 
103
+ ## Citation Information
104
  If you use any of these resources (datasets or models) in your work, please cite our latest paper:
105
  ```bibtex
106
  @inproceedings{armengol-estape-etal-2021-multilingual,
125
  ```
126
 
127
  ### Funding
 
128
  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).
129
 
130
 
 
131
  ## Contributions
132
 
133
+ [N/A]