mbruton commited on
Commit
62ce037
·
1 Parent(s): d1a4294

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
+ language:
6
+ - gl
7
+ metrics:
8
+ - seqeval
9
+ library_name: transformers
10
+ pipeline_tag: token-classification
11
+ ---
12
+
13
+ # Model Card for Model ID
14
+
15
+ This model is fine-tuned on [multilingual BERT](https://huggingface.co/bert-base-multilingual-cased) 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.
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ Galician mBERT 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 cased: it makes a difference between english and English. It was fine-tuned with the following objectives:
22
+
23
+ - Identify up to 13 verbal roots within a sentence.
24
+ - 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.
25
+
26
+ Labels are produced as the following: r#:tag
27
+ - where r# links the token to a specific verbal root of index #
28
+ - and tag identifies the token as the verbal root (root) or an individual argument (arg0/arg1/arg2)
29
+
30
+ - **Developed by:** [Micaella Bruton](mailto:[email protected])
31
+ - **Model type:** Transformers
32
+ - **Language(s) (NLP):** Galician (gl)
33
+ - **License:** Apache 2.0
34
+ - **Finetuned from model:** [[multilingual BERT](https://huggingface.co/bert-base-multilingual-cased)
35
+
36
+ ### Model Sources [optional]
37
+
38
+ <!-- Provide the basic links for the model. -->
39
+
40
+ - **Repository:** [GalicianSRL](https://github.com/mbruton0426/GalicianSRL)
41
+ - **Paper [optional]:** 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 sentence and manual validation of native speakers.
50
+
51
+
52
+ ## Training Details
53
+
54
+ ### Training Data
55
+
56
+ This model was trained on the "train" portion of the [GalicianSRL](https://huggingface.co/datasets/mbruton/galician_srl) Dataset 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 trained on the "train" portion of the [GalicianSRL](https://huggingface.co/datasets/mbruton/galician_srl) Dataset 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.72 | 0.77 | 0.74 | 485 |
92
+ | 0:arg1 | 0.74 | 0.74 | 0.74 | 483 |
93
+ | 0:arg2 | 0.66 | 0.76 | 0.71 | 264 |
94
+ | 0:root | 0.92 | 0.91 | 0.92 | 948 |
95
+ | 10:arg1 | 0.00 | 0.00 | 0.00 | 1 |
96
+ | 10:root | 0.00 | 0.00 | 0.00 | 2 |
97
+ | 1:arg0 | 0.68 | 0.62 | 0.65 | 348 |
98
+ | 1:arg1 | 0.69 | 0.63 | 0.66 | 443 |
99
+ | 1:arg2 | 0.65 | 0.55 | 0.59 | 211 |
100
+ | 1:root | 0.85 | 0.83 | 0.84 | 802 |
101
+ | 2:arg0 | 0.59 | 0.56 | 0.57 | 240 |
102
+ | 2:arg1 | 0.61 | 0.58 | 0.59 | 331 |
103
+ | 2:arg2 | 0.56 | 0.55 | 0.56 | 156 |
104
+ | 2:root | 0.79 | 0.70 | 0.74 | 579 |
105
+ | 3:arg0 | 0.42 | 0.45 | 0.44 | 137 |
106
+ | 3:arg1 | 0.54 | 0.55 | 0.55 | 216 |
107
+ | 3:arg2 | 0.48 | 0.52 | 0.50 | 110 |
108
+ | 3:root | 0.63 | 0.71 | 0.67 | 374 |
109
+ | 4:arg0 | 0.42 | 0.40 | 0.41 | 70 |
110
+ | 4:arg1 | 0.50 | 0.52 | 0.51 | 109 |
111
+ | 4:arg2 | 0.46 | 0.50 | 0.48 | 66 |
112
+ | 4:root | 0.50 | 0.72 | 0.59 | 206 |
113
+ | 5:arg0 | 0.27 | 0.20 | 0.23 | 20 |
114
+ | 5:arg1 | 0.35 | 0.51 | 0.41 | 57 |
115
+ | 5:arg2 | 0.27 | 0.14 | 0.19 | 28 |
116
+ | 5:root | 0.42 | 0.28 | 0.34 | 102 |
117
+ | 6:arg0 | 0.50 | 0.08 | 0.13 | 13 |
118
+ | 6:arg1 | 0.20 | 0.04 | 0.07 | 25 |
119
+ | 6:arg2 | 0.00 | 0.00 | 0.00 | 8 |
120
+ | 6:root | 0.25 | 0.21 | 0.23 | 42 |
121
+ | 7:arg0 | 0.00 | 0.00 | 0.00 | 3 |
122
+ | 7:arg1 | 0.00 | 0.00 | 0.00 | 8 |
123
+ | 7:arg2 | 0.00 | 0.00 | 0.00 | 5 |
124
+ | 7:root | 0.00 | 0.00 | 0.00 | 16 |
125
+ | 8:arg0 | 0.00 | 0.00 | 0.00 | 1 |
126
+ | 8:arg1 | 0.00 | 0.00 | 0.00 | 2 |
127
+ | 8:arg2 | 0.00 | 0.00 | 0.00 | 1 |
128
+ | 8:root | 0.00 | 0.00 | 0.00 | 7 |
129
+ | 9:arg0 | 0.00 | 0.00 | 0.00 | 1 |
130
+ | 9:arg1 | 0.00 | 0.00 | 0.00 | 2 |
131
+ | 9:arg2 | 0.00 | 0.00 | 0.00 | 1 |
132
+ | 9:root | 0.00 | 0.00 | 0.00 | 3 |
133
+ | micro avg | 0.69 | 0.68 | 0.69 | 6926 |
134
+ | macro avg | 0.35 | 0.33 | 0.33 | 6926 |
135
+ | weighted avg | 0.69 | 0.68 | 0.68 | 6926 |
136
+ | tot root avg | 0.40 | 0.40 | 0.39 | 3081 |
137
+ | tot A0 avg | 0.36 | 0.31 | 0.32 | 1318 |
138
+ | tot A1 avg | 0.33 | 0.32 | 0.32 | 1677 |
139
+ | tot A2 avg | 0.31 | 0.30 | 0.30 | 850 |
140
+ | tot r0 avg | 0.76 | 0.80 | 0.78 | 2180 |
141
+ | tot r1 avg | 0.72 | 0.66 | 0.69 | 1804 |
142
+ | tot r2 avg | 0.64 | 0.60 | 0.62 | 1306 |
143
+ | tot r3 avg | 0.52 | 0.56 | 0.54 | 837 |
144
+ | tot r4 avg | 0.47 | 0.54 | 0.50 | 451 |
145
+ | tot r5 avg | 0.33 | 0.28 | 0.29 | 207 |
146
+ | tot r6 avg | 0.24 | 0.08 | 0.11 | 88 |
147
+ | tot r7 avg | 0.00 | 0.00 | 0.00 | 32 |
148
+ | tot r8 avg | 0.00 | 0.00 | 0.00 | 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
+ ```