Updated README
Browse files
README.md
CHANGED
|
@@ -2,46 +2,140 @@
|
|
| 2 |
license: agpl-3.0
|
| 3 |
language:
|
| 4 |
- it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
# EventNet-ITA
|
| 7 |
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
## Model Details
|
| 12 |
|
| 13 |
### Model Description
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
### Model Sources
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
-
## Training Details
|
| 30 |
|
| 31 |
### Training Data
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
## Evaluation
|
| 35 |
|
|
|
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 43 |
|
| 44 |
-
**BibTeX:**
|
| 45 |
-
```
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
```
|
|
|
|
| 2 |
license: agpl-3.0
|
| 3 |
language:
|
| 4 |
- it
|
| 5 |
+
task_categories:
|
| 6 |
+
- token-classification
|
| 7 |
+
datasets:
|
| 8 |
+
- mrovera/eventnet-ita
|
| 9 |
+
tags:
|
| 10 |
+
- Frame Parsing
|
| 11 |
+
- Event Extraction
|
| 12 |
---
|
| 13 |
# EventNet-ITA
|
| 14 |
|
| 15 |
+
The model is a full-text frame parser for events in Italian and it has been trained on [EventNet-ITA](https://huggingface.co/datasets/mrovera/eventnet-ita).
|
| 16 |
+
The model can be used for _full-text_ Frame Parsing and Event Extraction.
|
| 17 |
|
| 18 |
|
| 19 |
## Model Details
|
| 20 |
|
| 21 |
### Model Description
|
| 22 |
|
| 23 |
+
In its current version, EventNet-ITA is able to recognize and classifiy 205 semantic frames and their (specific) frame elements. The unit of analysis is the sentence.
|
| 24 |
|
|
|
|
| 25 |
|
| 26 |
+
### Direct Use
|
| 27 |
|
| 28 |
+
Provided with an input sequence of tokens, the model labels each token with the corresponding frame and/or frame element label(s).
|
| 29 |
+
```
|
| 30 |
+
La B-ENTITY*BEING_LOCATED|B-THEME*CONQUERING
|
| 31 |
+
cittadina I-ENTITY*BEING_LOCATED|I-THEME*CONQUERING
|
| 32 |
+
, O
|
| 33 |
+
posta B-BEING_LOCATED
|
| 34 |
+
a B-RELATIVE_LOCATION*BEING_LOCATED
|
| 35 |
+
est I-RELATIVE_LOCATION*BEING_LOCATED
|
| 36 |
+
del I-RELATIVE_LOCATION*BEING_LOCATED
|
| 37 |
+
corso I-RELATIVE_LOCATION*BEING_LOCATED
|
| 38 |
+
d' I-RELATIVE_LOCATION*BEING_LOCATED
|
| 39 |
+
acqua I-RELATIVE_LOCATION*BEING_LOCATED
|
| 40 |
+
, O
|
| 41 |
+
venne O
|
| 42 |
+
conquistata B-CONQUERING
|
| 43 |
+
, O
|
| 44 |
+
ma O
|
| 45 |
+
il B-EXPLOSIVE*DETONATE_EXPLOSIVE
|
| 46 |
+
ponte I-EXPLOSIVE*DETONATE_EXPLOSIVE
|
| 47 |
+
sul I-EXPLOSIVE*DETONATE_EXPLOSIVE
|
| 48 |
+
fiume I-EXPLOSIVE*DETONATE_EXPLOSIVE
|
| 49 |
+
era O
|
| 50 |
+
già O
|
| 51 |
+
stato O
|
| 52 |
+
fatto B-DETONATE_EXPLOSIVE
|
| 53 |
+
saltare I-DETONATE_EXPLOSIVE
|
| 54 |
+
regolarmente O
|
| 55 |
+
dai B-AGENT*DETONATE_EXPLOSIVE
|
| 56 |
+
genieri I-AGENT*DETONATE_EXPLOSIVE
|
| 57 |
+
francesi I-AGENT*DETONATE_EXPLOSIVE
|
| 58 |
+
. O
|
| 59 |
+
```
|
| 60 |
|
| 61 |
|
| 62 |
+
## Training Details
|
| 63 |
|
| 64 |
+
The model has been trained using [MaChAmp](https://github.com/machamp-nlp/machamp), a Python tookit supporting a variety of NLP tasks, by fine-tuning [this Italian BERT pretrained model](https://huggingface.co/dbmdz/bert-base-italian-xxl-cased).
|
| 65 |
+
Training hyperparameters:
|
| 66 |
+
- Batch size: 64
|
| 67 |
+
- Learning rate: 1.5e-3
|
| 68 |
+
|
| 69 |
+
All other hyperparameters have been left unchanged w.r.t. the default MaChAmp configuration for the multi-sequential token classification task.
|
| 70 |
|
| 71 |
|
|
|
|
| 72 |
|
| 73 |
### Training Data
|
| 74 |
|
| 75 |
+
Please refer to the [dataset repo](https://huggingface.co/datasets/mrovera/eventnet-ita).
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
### Model Re-training
|
| 79 |
+
|
| 80 |
+
In order to re-train the model, download the [dataset](https://huggingface.co/datasets/mrovera/eventnet-ita) and follow the instructions for training a [multiseq task](https://github.com/machamp-nlp/machamp/blob/master/docs/multiseq.md) in MaChAmp.
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
### Inference
|
| 84 |
+
|
| 85 |
+
EventNet-ITA's model can be used for Frame Parsing on new texts.
|
| 86 |
+
In order to do so, you have to follow a few simple steps.
|
| 87 |
+
1. Clone the github repo: `git clone https://github.com/machamp-nlp/machamp.git`
|
| 88 |
+
2. Download EventNet-ITA's model from this repo (450 MB) and move it into the `machamp` folder (where is up to you, by default MaChAmp saves trained models in the logs folder)
|
| 89 |
+
3. Save the data you want to use for prediction in a two-column tsv file, one word per line, with a placeholder in column 1, each sentence separated by a blank line (without placeholder), like this:
|
| 90 |
+
```
|
| 91 |
+
This _
|
| 92 |
+
is _
|
| 93 |
+
the _
|
| 94 |
+
first _
|
| 95 |
+
sentence _
|
| 96 |
+
. _
|
| 97 |
+
|
| 98 |
+
This _
|
| 99 |
+
is _
|
| 100 |
+
the _
|
| 101 |
+
second _
|
| 102 |
+
one _
|
| 103 |
+
. _
|
| 104 |
+
```
|
| 105 |
+
4. Follow the instruction for predicting with [MaChAmp](https://github.com/machamp-nlp/machamp) (see section "Prediction") using a fine-tuned model.
|
| 106 |
|
| 107 |
## Evaluation
|
| 108 |
|
| 109 |
+
The model has been evaluated on three folds, each time with a stratified split of the dataset, with a 80/10/10 train/dev/test ratio. Please see the paper for further details. Hereafter we report the synthetic values obtained by averaging the Precision, Recall and F1-score values of the three splits.
|
| 110 |
|
| 111 |
+
**Token-based** (**_relaxed_**) performance:
|
| 112 |
+
| | P | R | F1 |
|
| 113 |
+
|----------------------------|--------|---------|---------|
|
| 114 |
+
|Frames | 0.904 | 0.914 | **0.907** |
|
| 115 |
+
|Frames (weighted) | 0.909 | 0.919 | 0.913 |
|
| 116 |
+
|Frame Elements | 0.841 | 0.724 | **0.761** |
|
| 117 |
+
|Frames Elements (weighted) | 0.850 | 0.779 | 0.804 |
|
| 118 |
|
| 119 |
|
| 120 |
+
**Span-based** (**_strict_**) performance:
|
| 121 |
+
| | P | R | F1 |
|
| 122 |
+
|----------------------------|--------|---------|--------|
|
| 123 |
+
|Frames | 0.906 | 0.899 | **0.901** |
|
| 124 |
+
|Frames (weighted) | 0.909 | 0.903 | 0.905 |
|
| 125 |
+
|Frame Elements | 0.829 | 0.666 | **0.724** |
|
| 126 |
+
|Frames Elements (weighted) | 0.853 | 0.711 | 0.768 |
|
| 127 |
|
|
|
|
| 128 |
|
|
|
|
|
|
|
| 129 |
|
| 130 |
+
### Citation Information
|
| 131 |
+
|
| 132 |
+
If you use EventNet-ITA, please cite the following paper:
|
| 133 |
+
|
| 134 |
+
```
|
| 135 |
+
@article{rovera2023eventnet,
|
| 136 |
+
title={EventNet-ITA: Italian Frame Parsing for Events},
|
| 137 |
+
author={Rovera, Marco},
|
| 138 |
+
journal={arXiv preprint arXiv:2305.10892},
|
| 139 |
+
year={2023}
|
| 140 |
+
}
|
| 141 |
```
|