mbruton commited on
Commit
c51975c
1 Parent(s): 87c2eaf

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +162 -0
README.md ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - mbruton/galician_srl
5
+ - CoNLL-2012
6
+ language:
7
+ - gl
8
+ - en
9
+ metrics:
10
+ - seqeval
11
+ library_name: transformers
12
+ pipeline_tag: token-classification
13
+ ---
14
+
15
+ # Model Card for GalXLM-R-en for Semantic Role Labeling (cased)
16
+
17
+ This model is fine-tuned on a version of [XLM RoBERTa Base](https://huggingface.co/xlm-roberta-base) which is pre-trained on the SRL task for English, 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.
18
+
19
+ ## Model Details
20
+
21
+ ### Model Description
22
+
23
+ GalXLM-R-en for Semantic Role Labeling (SRL) is a transformers model, leveraging XLM-R's extensive pretraining on 100 languages to achieve better SRL predictions for low-resource Galician. It was fine-tuned on Galician with the following objectives:
24
+
25
+ - Identify up to 13 verbal roots within a sentence.
26
+ - 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.
27
+
28
+ 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)
29
+
30
+ - **Developed by:** [Micaella Bruton](mailto:micaellabruton@gmail.com)
31
+ - **Model type:** Transformers
32
+ - **Language(s) (NLP):** Galician (gl), English (en)
33
+ - **License:** Apache 2.0
34
+ - **Finetuned from model:** [English pre-trained XLM RoBERTa Base](https://huggingface.co/liaad/srl-en_xlmr-base)
35
+
36
+ ### Model Sources
37
+
38
+ - **Repository:** [GalicianSRL](https://github.com/mbruton0426/GalicianSRL)
39
+ - **Paper:** To be updated
40
+
41
+ ## Uses
42
+
43
+ This model is intended to be used to develop and improve natural language processing tools for Galician.
44
+
45
+ ## Bias, Risks, and Limitations
46
+
47
+ 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.
48
+
49
+ ## Training Details
50
+
51
+ ### Training Data
52
+
53
+ This model was pre-trained on the [OntoNotes 5.0 English SRL corpus](http://catalog.ldc.upenn.edu/LDC2013T19).
54
+ 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.
55
+
56
+ #### Training Hyperparameters
57
+
58
+ - **Learning Rate:** 2e-5
59
+ - **Batch Size:** 16
60
+ - **Weight Decay:** 0.01
61
+ - **Early Stopping:** 10 epochs
62
+
63
+ ## Evaluation
64
+
65
+ #### Testing Data
66
+
67
+ 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.
68
+
69
+ #### Metrics
70
+
71
+ [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.
72
+ It supplies scoring both overall and per label type.
73
+
74
+ Overall:
75
+ - `accuracy`: the average [accuracy](https://huggingface.co/metrics/accuracy), on a scale between 0.0 and 1.0.
76
+ - `precision`: the average [precision](https://huggingface.co/metrics/precision), on a scale between 0.0 and 1.0.
77
+ - `recall`: the average [recall](https://huggingface.co/metrics/recall), on a scale between 0.0 and 1.0.
78
+ - `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.
79
+
80
+ Per label type:
81
+ - `precision`: the average [precision](https://huggingface.co/metrics/precision), on a scale between 0.0 and 1.0.
82
+ - `recall`: the average [recall](https://huggingface.co/metrics/recall), on a scale between 0.0 and 1.0.
83
+ - `f1`: the average [F1 score](https://huggingface.co/metrics/f1), on a scale between 0.0 and 1.0.
84
+
85
+ ### Results
86
+
87
+ | Label | Precision | Recall | f1-score | Support |
88
+ | :----------: | :-------: | :----: | :------: | :-----: |
89
+ | 0:arg0 | 0.73 | 0.77 | 0.75 | 485 |
90
+ | 0:arg1 | 0.75 | 0.71 | 0.73 | 483 |
91
+ | 0:arg2 | 0.60 | 0.83 | 0.69 | 264 |
92
+ | 0:root | 0.93 | 0.93 | 0.93 | 948 |
93
+ | 1:arg0 | 0.61 | 0.67 | 0.63 | 348 |
94
+ | 1:arg1 | 0.70 | 0.66 | 0.68 | 443 |
95
+ | 1:arg2 | 0.58 | 0.64 | 0.61 | 211 |
96
+ | 1:root | 0.85 | 0.86 | 0.86 | 802 |
97
+ | 2:arg0 | 0.52 | 0.60 | 0.55 | 240 |
98
+ | 2:arg1 | 0.59 | 0.66 | 0.62 | 331 |
99
+ | 2:arg2 | 0.48 | 0.67 | 0.56 | 156 |
100
+ | 2:root | 0.76 | 0.78 | 0.77 | 579 |
101
+ | 3:arg0 | 0.38 | 0.34 | 0.36 | 137 |
102
+ | 3:arg1 | 0.52 | 0.60 | 0.56 | 216 |
103
+ | 3:arg2 | 0.43 | 0.50 | 0.46 | 110 |
104
+ | 3:root | 0.68 | 0.71 | 0.70 | 374 |
105
+ | 4:arg0 | 0.42 | 0.21 | 0.28 | 70 |
106
+ | 4:arg1 | 0.55 | 0.42 | 0.48 | 109 |
107
+ | 4:arg2 | 0.42 | 0.38 | 0.40 | 66 |
108
+ | 4:root | 0.64 | 0.57 | 0.60 | 206 |
109
+ | 5:arg0 | 0.27 | 0.30 | 0.29 | 20 |
110
+ | 5:arg1 | 0.43 | 0.46 | 0.44 | 57 |
111
+ | 5:arg2 | 0.47 | 0.32 | 0.38 | 28 |
112
+ | 5:root | 0.59 | 0.50 | 0.54 | 102 |
113
+ | 6:arg0 | 0.33 | 0.08 | 0.12 | 13 |
114
+ | 6:arg1 | 0.21 | 0.12 | 0.15 | 25 |
115
+ | 6:arg2 | 0.00 | 0.00 | 0.00 | 8 |
116
+ | 6:root | 0.40 | 0.40 | 0.40 | 42 |
117
+ | 7:arg0 | 0.00 | 0.00 | 0.00 | 3 |
118
+ | 7:arg1 | 0.00 | 0.00 | 0.00 | 8 |
119
+ | 7:arg2 | 0.00 | 0.00 | 0.00 | 5 |
120
+ | 7:root | 0.18 | 0.12 | 0.15 | 16 |
121
+ | 8:arg0 | 0.00 | 0.00 | 0.00 | 1 |
122
+ | 8:arg1 | 0.00 | 0.00 | 0.00 | 2 |
123
+ | 8:arg2 | 0.00 | 0.00 | 0.00 | 1 |
124
+ | 8:root | 0.00 | 0.00 | 0.00 | 7 |
125
+ | 9:arg0 | 0.00 | 0.00 | 0.00 | 1 |
126
+ | 9:arg1 | 0.00 | 0.00 | 0.00 | 2 |
127
+ | 9:arg2 | 0.00 | 0.00 | 0.00 | 1 |
128
+ | 9:root | 0.00 | 0.00 | 0.00 | 3 |
129
+ | 10:arg1 | 0.00 | 0.00 | 0.00 | 1 |
130
+ | 10:root | 0.00 | 0.00 | 0.00 | 2 |
131
+ | micro avg | 0.69 | 0.71 | 0.70 | 6926 |
132
+ | macro avg | 0.36 | 0.35 | 0.35 | 6926 |
133
+ | weighted avg | 0.69 | 0.71 | 0.70 | 6926 |
134
+ | tot root avg | 0.46 | 0.44 | 0.45 | 3081 |
135
+ | tot A0 avg | 0.33 | 0.30 | 0.30 | 1318 |
136
+ | tot A1 avg | 0.34 | 0.33 | 0.33 | 1677 |
137
+ | tot A2 avg | 0.30 | 0.33 | 0.31 | 850 |
138
+ | tot r0 avg | 0.75 | 0.81 | 0.78 | 2180 |
139
+ | tot r1 avg | 0.69 | 0.71 | 0.70 | 1804 |
140
+ | tot r2 avg | 0.59 | 0.68 | 0.63 | 1306 |
141
+ | tot r3 avg | 0.50 | 0.54 | 0.52 | 837 |
142
+ | tot r4 avg | 0.51 | 0.40 | 0.44 | 451 |
143
+ | tot r5 avg | 0.44 | 0.40 | 0.41 | 207 |
144
+ | tot r6 avg | 0.24 | 0.15 | 0.17 | 88 |
145
+ | tot r7 avg | 0.05 | 0.03 | 0.04 | 32 |
146
+ | tot r8 avg | 0.00 | 0.00 | 0.00 | 11 |
147
+ | tot r9 avg | 0.00 | 0.00 | 0.00 | 7 |
148
+ | tot r10 avg | 0.00 | 0.00 | 0.00 | 3 |
149
+
150
+ ## Citation
151
+
152
+ **BibTeX:**
153
+
154
+ ```
155
+ @mastersthesis{bruton-galician-srl-23,
156
+ author = {Bruton, Micaella},
157
+ title = {BERTie Bott's Every Flavor Labels: A Tasty Guide to Developing a Semantic Role Labeling Model for Galician},
158
+ school = {Uppsala University},
159
+ year = {2023},
160
+ type = {Master's thesis},
161
+ }
162
+ ```