
# Model Card for SpaBERT for Semantic Role Labeling (cased)

This model is fine-tuned on a version of [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). 

## Model Details

### Model Description

SpaBERT for Semantic Role Labeling (SRL) is a transformers model, leveraging mBERT's extensive pretraining on 104 languages to achieve better SRL predictions for Spanish. It was fine-tuned on Spanish with the following objectives: 

- Identify up to 16 verbal roots within a sentence.
- Identify available arguments and thematic roles for each verbal root. 

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/arg3/argM) and it's thematic role (adv/agt/atr/ben/cau/cot/des/efi/ein/exp/ext/fin/ins/loc/mnr/ori/pat/src/tem/tmp)

- **Developed by:** [Micaella Bruton](mailto:micaellabruton@gmail.com)
- **Model type:** Transformers
- **Language(s) (NLP):** Spanish (es)
- **License:** Apache 2.0
- **Finetuned from model:** [multilingual BERT](https://huggingface.co/bert-base-multilingual-cased)

### Model Sources 

- **Repository:** [GalicianSRL](https://github.com/mbruton0426/GalicianSRL)
- **Paper:** To be updated

## Uses

This model is intended to be used to develop and improve natural language processing tools for Spanish.

## Bias, Risks, and Limitations

The Spanish training set lacked highly complex sentences and as such, performs much better on sentences of mid- to low-complexity.

## Training Details

### Training Data

This model was fine-tuned on the "train" portion of the [SpanishSRL Dataset](https://huggingface.co/datasets/mbruton/spanish_srl) produced as part of this same project.

#### Training Hyperparameters

- **Learning Rate:** 2e-5
- **Batch Size:** 16
- **Weight Decay:** 0.01
- **Early Stopping:** 10 epochs

## Evaluation

#### Testing Data

This model was tested on the "test" portion of the [SpanishSRL Dataset](https://huggingface.co/datasets/mbruton/spanish_srl) produced as part of this same project.

#### Metrics

[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.
It supplies scoring both overall and per label type.

Overall:
- `accuracy`: the average [accuracy](https://huggingface.co/metrics/accuracy), on a scale between 0.0 and 1.0.
- `precision`: the average [precision](https://huggingface.co/metrics/precision), on a scale between 0.0 and 1.0.
- `recall`: the average [recall](https://huggingface.co/metrics/recall), on a scale between 0.0 and 1.0.
- `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.

Per label type:
- `precision`: the average [precision](https://huggingface.co/metrics/precision), on a scale between 0.0 and 1.0.
- `recall`: the average [recall](https://huggingface.co/metrics/recall), on a scale between 0.0 and 1.0.
- `f1`: the average [F1 score](https://huggingface.co/metrics/f1), on a scale between 0.0 and 1.0.

### Results

| Label        | Precision | Recall | f1-score | Support |
| :----------: | :-------: | :----: | :------: | :-----: |
| 0:arg0:agt       | 0.94 | 0.91 | 0.92 | 867   |
| 0:arg0:cau       | 0.68 | 0.70 | 0.69 | 57    |
| 0:arg0:src       | 0.00 | 0.00 | 0.00 | 1     |
| 0:arg1:ext       | 0.00 | 0.00 | 0.00 | 3     |
| 0:arg1:pat       | 0.89 | 0.89 | 0.89 | 536   |
| 0:arg1:tem       | 0.88 | 0.89 | 0.88 | 589   |
| 0:arg2:atr       | 0.85 | 0.91 | 0.88 | 278   |
| 0:arg2:ben       | 0.75 | 0.85 | 0.80 | 78    |
| 0:arg2:efi       | 0.80 | 0.57 | 0.67 | 7     |
| 0:arg2:exp       | 0.00 | 0.00 | 0.00 | 6     |
| 0:arg2:ext       | 0.47 | 0.53 | 0.50 | 15    |
| 0:arg2:loc       | 0.51 | 0.53 | 0.52 | 57    |
| 0:arg3:ben       | 0.00 | 0.00 | 0.00 | 5     |
| 0:arg3:ein       | 0.00 | 0.00 | 0.00 | 1     |
| 0:arg3:fin       | 1.00 | 0.50 | 0.67 | 2     |
| 0:arg3:ori       | 0.55 | 0.60 | 0.57 | 10    |
| 0:arg4:des       | 0.47 | 0.88 | 0.61 | 16    |
| 0:arg4:efi       | 0.00 | 0.00 | 0.00 | 5     |
| 0:argM:adv       | 0.64 | 0.55 | 0.59 | 268   |
| 0:argM:atr       | 0.54 | 0.54 | 0.54 | 24    |
| 0:argM:cau       | 0.72 | 0.56 | 0.63 | 41    |
| 0:argM:ext       | 0.00 | 0.00 | 0.00 | 5     |
| 0:argM:fin       | 0.79 | 0.74 | 0.76 | 46    |
| 0:argM:loc       | 0.72 | 0.77 | 0.74 | 186   |
| 0:argM:mnr       | 0.59 | 0.52 | 0.55 | 66    |
| 0:argM:tmp       | 0.83 | 0.88 | 0.85 | 411   |
| 0:root           | 0.99 | 0.99 | 0.99 | 1662  |
| 1:arg0:agt       | 0.91 | 0.92 | 0.92 | 564   |
| 1:arg0:cau       | 0.83 | 0.77 | 0.80 | 44    |
| 1:arg1:ext       | 0.00 | 0.00 | 0.00 | 2     |
| 1:arg1:pat       | 0.88 | 0.89 | 0.88 | 482   |
| 1:arg1:tem       | 0.90 | 0.88 | 0.89 | 390   |
| 1:arg2:atr       | 0.85 | 0.88 | 0.86 | 197   |
| 1:arg2:ben       | 0.76 | 0.83 | 0.80 | 66    |
| 1:arg2:efi       | 0.67 | 0.33 | 0.44 | 6     |
| 1:arg2:ext       | 0.56 | 0.71 | 0.63 | 7     |
| 1:arg2:ins       | 0.00 | 0.00 | 0.00 | 1     |
| 1:arg2:loc       | 0.55 | 0.50 | 0.52 | 44    |
| 1:arg3:ben       | 0.00 | 0.00 | 0.00 | 2     |
| 1:arg3:ein       | 0.00 | 0.00 | 0.00 | 3     |
| 1:arg3:fin       | 1.00 | 0.50 | 0.67 | 2     |
| 1:arg3:ori       | 0.17 | 0.50 | 0.25 | 2     |
| 1:arg4:des       | 0.56 | 1.00 | 0.71 | 10    |
| 1:arg4:efi       | 0.00 | 0.00 | 0.00 | 2     |
| 1:argM:adv       | 0.68 | 0.53 | 0.59 | 220   |
| 1:argM:atr       | 0.61 | 0.74 | 0.67 | 19    |
| 1:argM:cau       | 0.45 | 0.66 | 0.53 | 35    |
| 1:argM:ext       | 0.00 | 0.00 | 0.00 | 7     |
| 1:argM:fin       | 0.54 | 0.74 | 0.62 | 38    |
| 1:argM:loc       | 0.68 | 0.76 | 0.72 | 156   |
| 1:argM:mnr       | 0.52 | 0.50 | 0.51 | 44    |
| 1:argM:tmp       | 0.79 | 0.80 | 0.79 | 247   |
| 1:root           | 0.96 | 0.97 | 0.96 | 1323  |
| 2:arg0:agt       | 0.86 | 0.88 | 0.87 | 336   |
| 2:arg0:cau       | 0.81 | 0.71 | 0.76 | 35    |
| 2:arg0:exp       | 0.00 | 0.00 | 0.00 | 1     |
| 2:arg0:src       | 0.00 | 0.00 | 0.00 | 1     |
| 2:arg1:pat       | 0.86 | 0.84 | 0.85 | 333   |
| 2:arg1:tem       | 0.85 | 0.82 | 0.84 | 291   |
| 2:arg2:atr       | 0.87 | 0.89 | 0.88 | 124   |
| 2:arg2:ben       | 0.70 | 0.81 | 0.75 | 43    |
| 2:arg2:efi       | 1.00 | 0.78 | 0.88 | 9     |
| 2:arg2:ext       | 0.17 | 0.20 | 0.18 | 5     |
| 2:arg2:ins       | 0.00 | 0.00 | 0.00 | 1     |
| 2:arg2:loc       | 0.51 | 0.67 | 0.58 | 27    |
| 2:arg3:ben       | 0.00 | 0.00 | 0.00 | 4     |
| 2:arg3:ein       | 0.00 | 0.00 | 0.00 | 1     |
| 2:arg3:ori       | 0.29 | 0.67 | 0.40 | 3     |
| 2:arg4:des       | 0.57 | 0.81 | 0.67 | 16    |
| 2:arg4:efi       | 0.00 | 0.00 | 0.00 | 6     |
| 2:argM:adv       | 0.60 | 0.51 | 0.55 | 176   |
| 2:argM:atr       | 0.70 | 0.47 | 0.56 | 15    |
| 2:argM:cau       | 0.45 | 0.53 | 0.49 | 17    |
| 2:argM:ext       | 0.00 | 0.00 | 0.00 | 4     |
| 2:argM:fin       | 0.83 | 0.69 | 0.76 | 36    |
| 2:argM:ins       | 0.00 | 0.00 | 0.00 | 1     |
| 2:argM:loc       | 0.66 | 0.70 | 0.68 | 117   |
| 2:argM:mnr       | 0.35 | 0.23 | 0.28 | 35    |
| 2:argM:tmp       | 0.74 | 0.77 | 0.76 | 161   |
| 2:root           | 0.95 | 0.94 | 0.94 | 913   |
| 3:arg0:agt       | 0.81 | 0.83 | 0.82 | 227   |
| 3:arg0:cau       | 0.67 | 0.86 | 0.75 | 14    |
| 3:arg1:pat       | 0.78 | 0.82 | 0.80 | 199   |
| 3:arg1:tem       | 0.74 | 0.78 | 0.76 | 160   |
| 3:arg2:atr       | 0.75 | 0.80 | 0.77 | 79    |
| 3:arg2:ben       | 0.80 | 0.89 | 0.84 | 27    |
| 3:arg2:efi       | 0.00 | 0.00 | 0.00 | 1     |
| 3:arg2:ext       | 0.00 | 0.00 | 0.00 | 3     |
| 3:arg2:loc       | 0.50 | 0.38 | 0.43 | 21    |
| 3:arg3:ben       | 0.00 | 0.00 | 0.00 | 3     |
| 3:arg3:ein       | 0.00 | 0.00 | 0.00 | 2     |
| 3:arg3:ori       | 0.00 | 0.00 | 0.00 | 3     |
| 3:arg4:des       | 0.44 | 1.00 | 0.61 | 7     |
| 3:arg4:efi       | 0.00 | 0.00 | 0.00 | 5     |
| 3:argM:adv       | 0.48 | 0.43 | 0.45 | 98    |
| 3:argM:atr       | 1.00 | 0.14 | 0.25 | 7     |
| 3:argM:cau       | 0.42 | 0.38 | 0.40 | 13    |
| 3:argM:ext       | 0.00 | 0.00 | 0.00 | 1     |
| 3:argM:fin       | 0.45 | 0.67 | 0.54 | 15    |
| 3:argM:loc       | 0.58 | 0.65 | 0.62 | 69    |
| 3:argM:mnr       | 0.33 | 0.45 | 0.38 | 11    |
| 3:argM:tmp       | 0.78 | 0.76 | 0.77 | 92    |
| 3:root           | 0.89 | 0.92 | 0.91 | 569   |
| 4:arg0:agt       | 0.82 | 0.82 | 0.82 | 119   |
| 4:arg0:cau       | 0.67 | 0.67 | 0.67 | 6     |
| 4:arg1:pat       | 0.74 | 0.75 | 0.74 | 87    |
| 4:arg1:tem       | 0.81 | 0.75 | 0.78 | 109   |
| 4:arg2:atr       | 0.74 | 0.74 | 0.74 | 53    |
| 4:arg2:ben       | 0.62 | 0.45 | 0.53 | 11    |
| 4:arg2:ext       | 0.00 | 0.00 | 0.00 | 1     |
| 4:arg2:loc       | 0.50 | 0.73 | 0.59 | 11    |
| 4:arg3:ein       | 0.00 | 0.00 | 0.00 | 1     |
| 4:arg3:ori       | 0.00 | 0.00 | 0.00 | 1     |
| 4:arg4:des       | 0.88 | 0.70 | 0.78 | 10    |
| 4:arg4:efi       | 0.00 | 0.00 | 0.00 | 1     |
| 4:argM:adv       | 0.41 | 0.52 | 0.46 | 50    |
| 4:argM:atr       | 0.00 | 0.00 | 0.00 | 4     |
| 4:argM:cau       | 0.12 | 0.33 | 0.18 | 3     |
| 4:argM:ext       | 0.00 | 0.00 | 0.00 | 1     |
| 4:argM:fin       | 0.50 | 0.55 | 0.52 | 11    |
| 4:argM:loc       | 0.56 | 0.83 | 0.67 | 24    |
| 4:argM:mnr       | 0.00 | 0.00 | 0.00 | 16    |
| 4:argM:tmp       | 0.70 | 0.73 | 0.72 | 52    |
| 4:root           | 0.86 | 0.83 | 0.84 | 322   |
| 5:arg0:agt       | 0.74 | 0.82 | 0.78 | 72    |
| 5:arg0:cau       | 1.00 | 0.40 | 0.57 | 5     |
| 5:arg1:pat       | 0.60 | 0.75 | 0.66 | 71    |
| 5:arg1:tem       | 0.82 | 0.68 | 0.75 | 41    |
| 5:arg2:atr       | 0.65 | 0.62 | 0.63 | 21    |
| 5:arg2:ben       | 0.33 | 0.67 | 0.44 | 6     |
| 5:arg2:efi       | 0.00 | 0.00 | 0.00 | 1     |
| 5:arg2:ext       | 0.00 | 0.00 | 0.00 | 1     |
| 5:arg2:loc       | 0.00 | 0.00 | 0.00 | 1     |
| 5:arg3:ein       | 0.00 | 0.00 | 0.00 | 1     |
| 5:arg4:des       | 0.00 | 0.00 | 0.00 | 1     |
| 5:arg4:efi       | 0.00 | 0.00 | 0.00 | 1     |
| 5:argM:adv       | 0.47 | 0.54 | 0.50 | 26    |
| 5:argM:cau       | 0.00 | 0.00 | 0.00 | 3     |
| 5:argM:fin       | 0.33 | 0.40 | 0.36 | 5     |
| 5:argM:loc       | 0.75 | 0.57 | 0.65 | 21    |
| 5:argM:mnr       | 0.00 | 0.00 | 0.00 | 7     |
| 5:argM:tmp       | 0.71 | 0.73 | 0.72 | 30    |
| 5:root           | 0.76 | 0.79 | 0.78 | 173   |
| 6:arg0:agt       | 0.71 | 0.59 | 0.65 | 34    |
| 6:arg0:cau       | 0.00 | 0.00 | 0.00 | 1     |
| 6:arg1:loc       | 0.00 | 0.00 | 0.00 | 1     |
| 6:arg1:pat       | 0.39 | 0.54 | 0.45 | 28    |
| 6:arg1:tem       | 0.40 | 0.50 | 0.44 | 16    |
| 6:arg2:atr       | 0.30 | 0.46 | 0.36 | 13    |
| 6:arg2:ben       | 0.27 | 0.60 | 0.37 | 5     |
| 6:arg2:loc       | 0.00 | 0.00 | 0.00 | 1     |
| 6:arg3:ben       | 0.00 | 0.00 | 0.00 | 1     |
| 6:argM:adv       | 0.21 | 0.40 | 0.28 | 10    |
| 6:argM:atr       | 0.00 | 0.00 | 0.00 | 2     |
| 6:argM:cau       | 0.00 | 0.00 | 0.00 | 1     |
| 6:argM:fin       | 0.00 | 0.00 | 0.00 | 2     |
| 6:argM:loc       | 0.38 | 0.71 | 0.50 | 7     |
| 6:argM:mnr       | 0.00 | 0.00 | 0.00 | 5     |
| 6:argM:tmp       | 0.14 | 0.29 | 0.19 | 7     |
| 6:root           | 0.62 | 0.68 | 0.65 | 82    |
| 7:arg0:agt       | 0.39 | 0.76 | 0.52 | 17    |
| 7:arg1:pat       | 0.47 | 0.53 | 0.50 | 17    |
| 7:arg1:tem       | 0.54 | 0.47 | 0.50 | 15    |
| 7:arg2:atr       | 0.30 | 0.20 | 0.24 | 15    |
| 7:arg2:ben       | 0.00 | 0.00 | 0.00 | 7     |
| 7:arg2:loc       | 0.00 | 0.00 | 0.00 | 1     |
| 7:arg3:ori       | 0.00 | 0.00 | 0.00 | 1     |
| 7:arg4:des       | 0.00 | 0.00 | 0.00 | 1     |
| 7:argM:adv       | 0.14 | 0.60 | 0.22 | 5     |
| 7:argM:atr       | 0.00 | 0.00 | 0.00 | 1     |
| 7:argM:fin       | 0.00 | 0.00 | 0.00 | 1     |
| 7:argM:loc       | 0.00 | 0.00 | 0.00 | 3     |
| 7:argM:tmp       | 0.00 | 0.00 | 0.00 | 6     |
| 7:root           | 0.69 | 0.53 | 0.60 | 45    |
| 8:arg0:agt       | 0.00 | 0.00 | 0.00 | 8     |
| 8:arg0:cau       | 0.00 | 0.00 | 0.00 | 1     |
| 8:arg1:pat       | 0.00 | 0.00 | 0.00 | 4     |
| 8:arg1:tem       | 0.07 | 0.11 | 0.08 | 9     |
| 8:arg2:atr       | 0.17 | 0.25 | 0.20 | 4     |
| 8:arg2:ext       | 0.00 | 0.00 | 0.00 | 1     |
| 8:arg2:loc       | 0.00 | 0.00 | 0.00 | 2     |
| 8:arg3:ori       | 0.00 | 0.00 | 0.00 | 1     |
| 8:argM:adv       | 0.00 | 0.00 | 0.00 | 8     |
| 8:argM:ext       | 0.00 | 0.00 | 0.00 | 1     |
| 8:argM:fin       | 0.00 | 0.00 | 0.00 | 1     |
| 8:argM:loc       | 0.00 | 0.00 | 0.00 | 4     |
| 8:argM:mnr       | 0.00 | 0.00 | 0.00 | 1     |
| 8:argM:tmp       | 0.00 | 0.00 | 0.00 | 1     |
| 8:root           | 0.48 | 0.60 | 0.54 | 25    |
| 9:arg0:agt       | 0.00 | 0.00 | 0.00 | 6     |
| 9:arg0:cau       | 0.00 | 0.00 | 0.00 | 1     |
| 9:arg1:pat       | 0.00 | 0.00 | 0.00 | 4     |
| 9:arg1:tem       | 0.00 | 0.00 | 0.00 | 5     |
| 9:arg2:atr       | 0.00 | 0.00 | 0.00 | 3     |
| 9:arg2:ben       | 0.00 | 0.00 | 0.00 | 1     |
| 9:argM:adv       | 0.00 | 0.00 | 0.00 | 6     |
| 9:argM:cau       | 0.00 | 0.00 | 0.00 | 1     |
| 9:argM:fin       | 0.00 | 0.00 | 0.00 | 2     |
| 9:argM:loc       | 0.00 | 0.00 | 0.00 | 2     |
| 9:argM:tmp       | 0.00 | 0.00 | 0.00 | 1     |
| 9:root           | 0.25 | 0.88 | 0.39 | 17    |
| 10:arg0:agt      | 0.00 | 0.00 | 0.00 | 3     |
| 10:arg1:pat      | 0.00 | 0.00 | 0.00 | 5     |
| 10:arg1:tem      | 0.00 | 0.00 | 0.00 | 3     |
| 10:arg2:atr      | 0.00 | 0.00 | 0.00 | 1     |
| 10:arg2:ben      | 0.00 | 0.00 | 0.00 | 2     |
| 10:argM:adv      | 0.00 | 0.00 | 0.00 | 3     |
| 10:argM:fin      | 0.00 | 0.00 | 0.00 | 1     |
| 10:argM:tmp      | 0.00 | 0.00 | 0.00 | 1     |
| 10:root          | 0.00 | 0.00 | 0.00 | 12    |
| 11:arg0:agt      | 0.00 | 0.00 | 0.00 | 1     |
| 11:arg0:cau      | 0.00 | 0.00 | 0.00 | 1     |
| 11:arg1:pat      | 0.00 | 0.00 | 0.00 | 2     |
| 11:arg1:tem      | 0.00 | 0.00 | 0.00 | 4     |
| 11:arg2:atr      | 0.00 | 0.00 | 0.00 | 3     |
| 11:arg2:ben      | 0.00 | 0.00 | 0.00 | 1     |
| 11:argM:adv      | 0.00 | 0.00 | 0.00 | 4     |
| 11:argM:loc      | 0.00 | 0.00 | 0.00 | 1     |
| 11:argM:tmp      | 0.00 | 0.00 | 0.00 | 1     |
| 11:root          | 0.00 | 0.00 | 0.00 | 9     |
| 12:arg0:agt      | 0.00 | 0.00 | 0.00 | 3     |
| 12:arg1:pat      | 0.00 | 0.00 | 0.00 | 1     |
| 12:arg1:tem      | 0.00 | 0.00 | 0.00 | 2     |
| 12:arg2:atr      | 0.00 | 0.00 | 0.00 | 2     |
| 12:argM:adv      | 0.00 | 0.00 | 0.00 | 1     |
| 12:argM:cau      | 0.00 | 0.00 | 0.00 | 1     |
| 12:argM:tmp      | 0.00 | 0.00 | 0.00 | 3     |
| 12:root          | 0.00 | 0.00 | 0.00 | 7     |
| 13:arg0:cau      | 0.00 | 0.00 | 0.00 | 1     |
| 13:arg1:tem      | 0.00 | 0.00 | 0.00 | 1     |
| 13:arg2:atr      | 0.00 | 0.00 | 0.00 | 1     |
| 13:argM:adv      | 0.00 | 0.00 | 0.00 | 1     |
| 13:argM:atr      | 0.00 | 0.00 | 0.00 | 1     |
| 13:argM:loc      | 0.00 | 0.00 | 0.00 | 1     |
| 13:root          | 0.00 | 0.00 | 0.00 | 4     |
| 14:arg1:pat      | 0.00 | 0.00 | 0.00 | 1     |
| 14:arg2:ben      | 0.00 | 0.00 | 0.00 | 1     |
| 14:argM:mnr      | 0.00 | 0.00 | 0.00 | 1     |
| 14:root          | 0.00 | 0.00 | 0.00 | 2     |
| micro avg        | 0.83 | 0.83 | 0.83 | 15436 |
| macro avg        | 0.31 | 0.33 | 0.31 | 15436 |
| weighted avg     | 0.82 | 0.83 | 0.82 | 15436 |
| tot root avg     | 0.50 | 0.54 | 0.51 | 5165  |
| tot arg0:agt avg | 0.48 | 0.50 | 0.48 | 2257  |
| tot arg0:cau avg | 0.42 | 0.37 | 0.39 | 166   |
| tot arg0:exp avg | 0.00 | 0.00 | 0.00 | 1     |
| tot arg0:src avg | 0.00 | 0.00 | 0.00 | 2     |
| tot arg0         | 0.40 | 0.39 | 0.39 | 2426  |
| tot arg1:ext avg | 0.00 | 0.00 | 0.00 | 5     |
| tot arg1:loc avg | 0.00 | 0.00 | 0.00 | 1     |
| tot arg1:pat avg | 0.40 | 0.43 | 0.41 | 1770  |
| tot arg1:tem avg | 0.43 | 0.42 | 0.42 | 1635  |
| tot arg1         | 0.37 | 0.38 | 0.38 | 3411  |
| tot arg2:atr avg | 0.39 | 0.41 | 0.40 | 794   |
| tot arg2:ben avg | 0.36 | 0.47 | 0.40 | 255   |
| tot arg2:efi avg | 0.49 | 0.34 | 0.40 | 24    |
| tot arg2:exp avg | 0.00 | 0.00 | 0.00 | 6     |
| tot arg2:ext avg | 0.17 | 0.21 | 0.19 | 33    |
| tot arg2:ins avg | 0.00 | 0.00 | 0.00 | 2     |
| tot arg2:loc avg | 0.29 | 0.31 | 0.29 | 165   |
| tot arg2         | 0.32 | 0.35 | 0.33 | 1279  |
| tot arg3:ben avg | 0.00 | 0.00 | 0.00 | 15    |
| tot arg3:ein avg | 0.00 | 0.00 | 0.00 | 9     |
| tot arg3:fin avg | 1.00 | 0.50 | 0.67 | 4     |
| tot arg3:ori avg | 0.14 | 0.25 | 0.17 | 21    |
| tot arg3         | 0.15 | 0.14 | 0.13 | 49    |
| tot arg4:des avg | 0.42 | 0.63 | 0.48 | 61    |
| tot arg4:efi avg | 0.00 | 0.00 | 0.00 | 20    |
| tot arg4         | 0.22 | 0.34 | 0.26 | 81    |
| tot argM:adv avg | 0.26 | 0.29 | 0.26 | 876   |
| tot argM:atr avg | 0.36 | 0.24 | 0.25 | 73    |
| tot argM:cau avg | 0.24 | 0.27 | 0.25 | 115   |
| tot argM:ext avg | 0.00 | 0.00 | 0.00 | 19    |
| tot argM:fin avg | 0.31 | 0.34 | 0.32 | 158   |
| tot argM:ins avg | 0.00 | 0.00 | 0.00 | 1     |
| tot argM:loc avg | 0.36 | 0.42 | 0.38 | 591   |
| tot argM:mnr avg | 0.20 | 0.19 | 0.19 | 186   |
| tot argM:tmp avg | 0.36 | 0.38 | 0.37 | 1013  |
| tot argM         | 0.28 | 0.29 | 0.27 | 3032  |
| tot r0 avg       | 0.54 | 0.53 | 0.53 | 5242  |
| tot r1 avg       | 0.53 | 0.55 | 0.53 | 3913  |
| tot r2 avg       | 0.47 | 0.48 | 0.47 | 2711  |
| tot r3 avg       | 0.45 | 0.47 | 0.44 | 1626  |
| tot r4 avg       | 0.43 | 0.45 | 0.43 | 892   |
| tot r5 avg       | 0.38 | 0.37 | 0.36 | 487   |
| tot r6 avg       | 0.20 | 0.28 | 0.23 | 216   |
| tot r7 avg       | 0.18 | 0.22 | 0.18 | 135   |
| tot r8 avg       | 0.05 | 0.06 | 0.05 | 71    |
| tot r9 avg       | 0.02 | 0.07 | 0.03 | 49    |
| tot r10 avg      | 0.00 | 0.00 | 0.00 | 31    |
| tot r11 avg      | 0.00 | 0.00 | 0.00 | 27    |
| tot r12 avg      | 0.00 | 0.00 | 0.00 | 20    |
| tot r13 avg      | 0.00 | 0.00 | 0.00 | 10    |
| tot r14 avg      | 0.00 | 0.00 | 0.00 | 5     |

## Citation

**BibTeX:**

```
@inproceedings{bruton-beloucif-2023-bertie,
    title = "{BERT}ie Bott{'}s Every Flavor Labels: A Tasty Introduction to Semantic Role Labeling for {G}alician",
    author = "Bruton, Micaella  and
      Beloucif, Meriem",
    editor = "Bouamor, Houda  and
      Pino, Juan  and
      Bali, Kalika",
    booktitle = "Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing",
    month = dec,
    year = "2023",
    address = "Singapore",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.emnlp-main.671",
    doi = "10.18653/v1/2023.emnlp-main.671",
    pages = "10892--10902",
    abstract = "In this paper, we leverage existing corpora, WordNet, and dependency parsing to build the first Galician dataset for training semantic role labeling systems in an effort to expand available NLP resources. Additionally, we introduce verb indexing, a new pre-processing method, which helps increase the performance when semantically parsing highly-complex sentences. We use transfer-learning to test both the resource and the verb indexing method. Our results show that the effects of verb indexing were amplified in scenarios where the model was both pre-trained and fine-tuned on datasets utilizing the method, but improvements are also noticeable when only used during fine-tuning. The best-performing Galician SRL model achieved an f1 score of 0.74, introducing a baseline for future Galician SRL systems. We also tested our method on Spanish where we achieved an f1 score of 0.83, outperforming the baseline set by the 2009 CoNLL Shared Task by 0.025 showing the merits of our verb indexing method for pre-processing.",
}

```
{"language": ["es"], "license": "apache-2.0", "library_name": "transformers", "datasets": ["mbruton/spanish_srl"], "metrics": ["seqeval"], "pipeline_tag": "token-classification"}
transformers pytorch bert token-classification es dataset:mbruton/spanish_srl license:apache-2.0 autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #bert #token-classification #es #dataset-mbruton/spanish_srl #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 

Model Card for SpaBERT for Semantic Role Labeling (cased)
=========================================================


This model is fine-tuned on a version of multilingual BERT and is one of 24 models introduced as part of this project.


Model Details
-------------


### Model Description


SpaBERT for Semantic Role Labeling (SRL) is a transformers model, leveraging mBERT's extensive pretraining on 104 languages to achieve better SRL predictions for Spanish. It was fine-tuned on Spanish with the following objectives:


* Identify up to 16 verbal roots within a sentence.
* Identify available arguments and thematic roles for each verbal root.


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/arg3/argM) and it's thematic role (adv/agt/atr/ben/cau/cot/des/efi/ein/exp/ext/fin/ins/loc/mnr/ori/pat/src/tem/tmp)


* Developed by: Micaella Bruton
* Model type: Transformers
* Language(s) (NLP): Spanish (es)
* License: Apache 2.0
* Finetuned from model: multilingual BERT


### Model Sources


* Repository: GalicianSRL
* Paper: To be updated


Uses
----


This model is intended to be used to develop and improve natural language processing tools for Spanish.


Bias, Risks, and Limitations
----------------------------


The Spanish training set lacked highly complex sentences and as such, performs much better on sentences of mid- to low-complexity.


Training Details
----------------


### Training Data


This model was fine-tuned on the "train" portion of the SpanishSRL Dataset produced as part of this same project.


#### Training Hyperparameters


* Learning Rate: 2e-5
* Batch Size: 16
* Weight Decay: 0.01
* Early Stopping: 10 epochs


Evaluation
----------


#### Testing Data


This model was tested on the "test" portion of the SpanishSRL Dataset produced as part of this same project.


#### Metrics


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.
It supplies scoring both overall and per label type.


Overall:


* 'accuracy': the average accuracy, on a scale between 0.0 and 1.0.
* 'precision': the average precision, on a scale between 0.0 and 1.0.
* 'recall': the average recall, on a scale between 0.0 and 1.0.
* 'f1': the average F1 score, which is the harmonic mean of the precision and recall. It also has a scale of 0.0 to 1.0.


Per label type:


* 'precision': the average precision, on a scale between 0.0 and 1.0.
* 'recall': the average recall, on a scale between 0.0 and 1.0.
* 'f1': the average F1 score, on a scale between 0.0 and 1.0.


### Results



BibTeX:



### Model Description


SpaBERT for Semantic Role Labeling (SRL) is a transformers model, leveraging mBERT's extensive pretraining on 104 languages to achieve better SRL predictions for Spanish. It was fine-tuned on Spanish with the following objectives:


* Identify up to 16 verbal roots within a sentence.
* Identify available arguments and thematic roles for each verbal root.


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/arg3/argM) and it's thematic role (adv/agt/atr/ben/cau/cot/des/efi/ein/exp/ext/fin/ins/loc/mnr/ori/pat/src/tem/tmp)


* Developed by: Micaella Bruton
* Model type: Transformers
* Language(s) (NLP): Spanish (es)
* License: Apache 2.0
* Finetuned from model: multilingual BERT ### Model Sources


* Repository: GalicianSRL
* Paper: To be updated


Uses
----


This model is intended to be used to develop and improve natural language processing tools for Spanish.


Bias, Risks, and Limitations
----------------------------


The Spanish training set lacked highly complex sentences and as such, performs much better on sentences of mid- to low-complexity.


Training Details
---------------- ### Training Data


This model was fine-tuned on the "train" portion of the SpanishSRL Dataset produced as part of this same project. #### Training Hyperparameters


* Learning Rate: 2e-5
* Batch Size: 16
* Weight Decay: 0.01
* Early Stopping: 10 epochs


Evaluation
---------- #### Testing Data


This model was tested on the "test" portion of the SpanishSRL Dataset produced as part of this same project. #### Metrics


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.
It supplies scoring both overall and per label type.


Overall:


* 'accuracy': the average accuracy, on a scale between 0.0 and 1.0.
* 'precision': the average precision, on a scale between 0.0 and 1.0.
* 'recall': the average recall, on a scale between 0.0 and 1.0.
* 'f1': the average F1 score, which is the harmonic mean of the precision and recall. It also has a scale of 0.0 to 1.0.


Per label type:


* 'precision': the average precision, on a scale between 0.0 and 1.0.
* 'recall': the average recall, on a scale between 0.0 and 1.0.
* 'f1': the average F1 score, on a scale between 0.0 and 1.0. ### Results



BibTeX:
TAGS
#transformers #pytorch #bert #token-classification #es #dataset-mbruton/spanish_srl #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 
 ### Model Description


SpaBERT for Semantic Role Labeling (SRL) is a transformers model, leveraging mBERT's extensive pretraining on 104 languages to achieve better SRL predictions for Spanish. It was fine-tuned on Spanish with the following objectives:


* Identify up to 16 verbal roots within a sentence.
* Identify available arguments and thematic roles for each verbal root.


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/arg3/argM) and it's thematic role (adv/agt/atr/ben/cau/cot/des/efi/ein/exp/ext/fin/ins/loc/mnr/ori/pat/src/tem/tmp)


* Developed by: Micaella Bruton
* Model type: Transformers
* Language(s) (NLP): Spanish (es)
* License: Apache 2.0
* Finetuned from model: multilingual BERT ### Model Sources


* Repository: GalicianSRL
* Paper: To be updated


Uses
----


This model is intended to be used to develop and improve natural language processing tools for Spanish.


Bias, Risks, and Limitations
----------------------------


The Spanish training set lacked highly complex sentences and as such, performs much better on sentences of mid- to low-complexity.


Training Details
---------------- ### Training Data


This model was fine-tuned on the "train" portion of the SpanishSRL Dataset produced as part of this same project. #### Training Hyperparameters


* Learning Rate: 2e-5
* Batch Size: 16
* Weight Decay: 0.01
* Early Stopping: 10 epochs


Evaluation
---------- #### Testing Data


This model was tested on the "test" portion of the SpanishSRL Dataset produced as part of this same project. #### Metrics


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.
It supplies scoring both overall and per label type.


Overall:


* 'accuracy': the average accuracy, on a scale between 0.0 and 1.0.
* 'precision': the average precision, on a scale between 0.0 and 1.0.
* 'recall': the average recall, on a scale between 0.0 and 1.0.
* 'f1': the average F1 score, which is the harmonic mean of the precision and recall. It also has a scale of 0.0 to 1.0.


Per label type:


* 'precision': the average precision, on a scale between 0.0 and 1.0.
* 'recall': the average recall, on a scale between 0.0 and 1.0.
* 'f1': the average F1 score, on a scale between 0.0 and 1.0. ### Results



BibTeX: