mbruton commited on
Commit
62a1e29
1 Parent(s): 432fd72

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +164 -0
README.md ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - mbruton/galician_srl
5
+ - PropBank.Br
6
+ - mbruton/spanish_srl
7
+ language:
8
+ - gl
9
+ - pt
10
+ - es
11
+ metrics:
12
+ - seqeval
13
+ library_name: transformers
14
+ pipeline_tag: token-classification
15
+ ---
16
+
17
+ # Model Card for GalBERT-ptsp for Semantic Role Labeling (cased)
18
+
19
+ This model is fine-tuned on a version of [multilingual BERT](https://huggingface.co/bert-base-multilingual-cased) which is pre-trained on the SRL task for Portuguese and Spanish, and is one of 24 models introduced as part of [this project](https://github.com/mbruton0426/GalicianSRL). Prior to this work, there were no published Galician datasets or models for SRL.
20
+
21
+ ## Model Details
22
+
23
+ ### Model Description
24
+
25
+ GalBERT-ptsp for Semantic Role Labeling (SRL) is a transformers model, leveraging mBERT's extensive pretraining on 104 languages to achieve better SRL predictions for low-resource Galician. This model is additionally pre-trained on the SRL task for Portuguese and Spanish. This model is cased: it makes a difference between english and English. It was fine-tuned on Galician with the following objectives:
26
+
27
+ - Identify up to 13 verbal roots within a sentence.
28
+ - Identify available arguments for each verbal root. Due to scarcity of data, this model focused solely on the identification of arguments 0, 1, and 2.
29
+
30
+ Labels are formatted as: r#:tag, where r# links the token to a specific verbal root of index #, and tag identifies the token as the verbal root (root) or an individual argument (arg0/arg1/arg2)
31
+
32
+ - **Developed by:** [Micaella Bruton](mailto:micaellabruton@gmail.com)
33
+ - **Model type:** Transformers
34
+ - **Language(s) (NLP):** Galician (gl), Portuguese (pt), Spanish (es)
35
+ - **License:** Apache 2.0
36
+ - **Finetuned from model:** [Portuguese & Spanish pre-trained multilingual BERT](https://huggingface.co/mbruton/spa_pt_mBERT)
37
+
38
+ ### Model Sources
39
+
40
+ - **Repository:** [GalicianSRL](https://github.com/mbruton0426/GalicianSRL)
41
+ - **Paper:** To be updated
42
+
43
+ ## Uses
44
+
45
+ This model is intended to be used to develop and improve natural language processing tools for Galician.
46
+
47
+ ## Bias, Risks, and Limitations
48
+
49
+ Galician is a low-resource language which prior to this project lacked a semantic role labeling dataset. As such, the dataset used to train this model is extrememly limited and could benefit from the inclusion of additional sentences and manual validation by native speakers.
50
+
51
+ ## Training Details
52
+
53
+ ### Training Data
54
+
55
+ This model was pre-trained on both the [PropBank.Br Portuguese SRL corpus](http://www.nilc.icmc.usp.br/portlex/index.php/en/projects/propbankbringl) and the [SpanishSRL Dataset](http://www.nilc.icmc.usp.br/portlex/index.php/en/projects/propbankbringl) produced as part of this same project.
56
+ This model was fine-tuned on the "train" portion of the [GalicianSRL Dataset](https://huggingface.co/datasets/mbruton/galician_srl) produced as part of this same project.
57
+
58
+ #### Training Hyperparameters
59
+
60
+ - **Learning Rate:** 2e-5
61
+ - **Batch Size:** 16
62
+ - **Weight Decay:** 0.01
63
+ - **Early Stopping:** 10 epochs
64
+
65
+ ## Evaluation
66
+
67
+ #### Testing Data
68
+
69
+ This model was tested on the "test" portion of the [GalicianSRL Dataset](https://huggingface.co/datasets/mbruton/galician_srl) produced as part of this same project.
70
+
71
+ #### Metrics
72
+
73
+ [seqeval](https://huggingface.co/spaces/evaluate-metric/seqeval) is a Python framework for sequence labeling evaluation. It can evaluate the performance of chunking tasks such as named-entity recognition, part-of-speech tagging, and semantic role labeling.
74
+ It supplies scoring both overall and per label type.
75
+
76
+ Overall:
77
+ - `accuracy`: the average [accuracy](https://huggingface.co/metrics/accuracy), on a scale between 0.0 and 1.0.
78
+ - `precision`: the average [precision](https://huggingface.co/metrics/precision), on a scale between 0.0 and 1.0.
79
+ - `recall`: the average [recall](https://huggingface.co/metrics/recall), on a scale between 0.0 and 1.0.
80
+ - `f1`: the average [F1 score](https://huggingface.co/metrics/f1), which is the harmonic mean of the precision and recall. It also has a scale of 0.0 to 1.0.
81
+
82
+ Per label type:
83
+ - `precision`: the average [precision](https://huggingface.co/metrics/precision), on a scale between 0.0 and 1.0.
84
+ - `recall`: the average [recall](https://huggingface.co/metrics/recall), on a scale between 0.0 and 1.0.
85
+ - `f1`: the average [F1 score](https://huggingface.co/metrics/f1), on a scale between 0.0 and 1.0.
86
+
87
+ ### Results
88
+
89
+ | Label | Precision | Recall | f1-score | Support |
90
+ | :----------: | :-------: | :----: | :------: | :-----: |
91
+ | 0:arg0 | 0.83 | 0.62 | 0.71 | 485 |
92
+ | 0:arg1 | 0.63 | 0.75 | 0.68 | 483 |
93
+ | 0:arg2 | 0.70 | 0.70 | 0.70 | 264 |
94
+ | 0:root | 0.93 | 0.92 | 0.92 | 948 |
95
+ | 1:arg0 | 0.63 | 0.63 | 0.63 | 348 |
96
+ | 1:arg1 | 0.67 | 0.63 | 0.65 | 443 |
97
+ | 1:arg2 | 0.60 | 0.62 | 0.61 | 211 |
98
+ | 1:root | 0.85 | 0.83 | 0.84 | 802 |
99
+ | 2:arg0 | 0.61 | 0.53 | 0.57 | 240 |
100
+ | 2:arg1 | 0.62 | 0.60 | 0.61 | 331 |
101
+ | 2:arg2 | 0.61 | 0.53 | 0.57 | 156 |
102
+ | 2:root | 0.76 | 0.77 | 0.77 | 579 |
103
+ | 3:arg0 | 0.55 | 0.46 | 0.50 | 137 |
104
+ | 3:arg1 | 0.57 | 0.54 | 0.56 | 216 |
105
+ | 3:arg2 | 0.44 | 0.66 | 0.53 | 110 |
106
+ | 3:root | 0.67 | 0.69 | 0.68 | 374 |
107
+ | 4:arg0 | 0.48 | 0.41 | 0.44 | 70 |
108
+ | 4:arg1 | 0.48 | 0.57 | 0.52 | 109 |
109
+ | 4:arg2 | 0.63 | 0.26 | 0.37 | 66 |
110
+ | 4:root | 0.58 | 0.67 | 0.62 | 206 |
111
+ | 5:arg0 | 0.50 | 0.45 | 0.47 | 20 |
112
+ | 5:arg1 | 0.49 | 0.49 | 0.49 | 57 |
113
+ | 5:arg2 | 0.50 | 0.18 | 0.26 | 28 |
114
+ | 5:root | 0.56 | 0.52 | 0.54 | 102 |
115
+ | 6:arg0 | 0.46 | 0.46 | 0.46 | 13 |
116
+ | 6:arg1 | 0.27 | 0.16 | 0.20 | 25 |
117
+ | 6:arg2 | 0.00 | 0.00 | 0.00 | 8 |
118
+ | 6:root | 0.36 | 0.40 | 0.38 | 42 |
119
+ | 7:arg0 | 0.00 | 0.00 | 0.00 | 3 |
120
+ | 7:arg1 | 0.00 | 0.00 | 0.00 | 8 |
121
+ | 7:arg2 | 0.00 | 0.00 | 0.00 | 5 |
122
+ | 7:root | 0.00 | 0.00 | 0.00 | 16 |
123
+ | 8:arg0 | 0.00 | 0.00 | 0.00 | 1 |
124
+ | 8:arg1 | 0.00 | 0.00 | 0.00 | 2 |
125
+ | 8:arg2 | 0.00 | 0.00 | 0.00 | 1 |
126
+ | 8:root | 0.25 | 0.29 | 0.27 | 7 |
127
+ | 9:arg0 | 0.00 | 0.00 | 0.00 | 1 |
128
+ | 9:arg1 | 0.00 | 0.00 | 0.00 | 2 |
129
+ | 9:arg2 | 0.00 | 0.00 | 0.00 | 1 |
130
+ | 9:root | 0.00 | 0.00 | 0.00 | 3 |
131
+ | 10:arg1 | 0.00 | 0.00 | 0.00 | 1 |
132
+ | 10:root | 0.00 | 0.00 | 0.00 | 2 |
133
+ | micro avg | 0.70 | 0.68 | 0.69 | 6926 |
134
+ | macro avg | 0.39 | 0.36 | 0.37 | 6926 |
135
+ | weighted avg | 0.70 | 0.68 | 0.69 | 6926 |
136
+ | tot root avg | 0.45 | 0.46 | 0.46 | 3081 |
137
+ | tot A0 avg | 0.41 | 0.36 | 0.38 | 1318 |
138
+ | tot A1 avg | 0.34 | 0.34 | 0.34 | 1677 |
139
+ | tot A2 avg | 0.35 | 0.30 | 0.30 | 850 |
140
+ | tot r0 avg | 0.77 | 0.75 | 0.75 | 2180 |
141
+ | tot r1 avg | 0.69 | 0.68 | 0.68 | 1804 |
142
+ | tot r2 avg | 0.65 | 0.61 | 0.63 | 1306 |
143
+ | tot r3 avg | 0.56 | 0.59 | 0.57 | 837 |
144
+ | tot r4 avg | 0.54 | 0.48 | 0.49 | 451 |
145
+ | tot r5 avg | 0.51 | 0.41 | 0.44 | 207 |
146
+ | tot r6 avg | 0.27 | 0.26 | 0.26 | 88 |
147
+ | tot r7 avg | 0.00 | 0.00 | 0.00 | 32 |
148
+ | tot r8 avg | 0.06 | 0.07 | 0.07 | 11 |
149
+ | tot r9 avg | 0.00 | 0.00 | 0.00 | 7 |
150
+ | tot r10 avg | 0.00 | 0.00 | 0.00 | 3 |
151
+
152
+ ## Citation
153
+
154
+ **BibTeX:**
155
+
156
+ ```
157
+ @mastersthesis{bruton-galician-srl-23,
158
+ author = {Bruton, Micaella},
159
+ title = {BERTie Bott's Every Flavor Labels: A Tasty Guide to Developing a Semantic Role Labeling Model for Galician},
160
+ school = {Uppsala University},
161
+ year = {2023},
162
+ type = {Master's thesis},
163
+ }
164
+ ```