đ Multilingual-Metaphor-Detection
This page offers a fine - tuned multilingual language model for token - level metaphor detection, leveraging the Huggingface token - classification approach.
đ Quick Start
This page provides a fine - tuned multilingual language model XLM - RoBERTa for metaphor detection on a token - level using the [Huggingface token - classification approach](https://huggingface.co/tasks/token - classification). Label 1 corresponds to metaphoric usage.
⨠Features
- Multilingual Capability: Utilizes the XLM - RoBERTa model for multilingual metaphor detection.
- Token - Level Detection: Detects metaphors at the token level.
- Decent Zero - Shot Performance: Shows good zero - shot performance on other languages even when trained on English data.
đĻ Installation
No specific installation steps are provided in the original document, so this section is skipped.
đģ Usage Examples
Basic Usage
The model can be used for metaphor detection on a token - level. For example, you can input text and get metaphor detection results where Label 1 represents metaphoric usage.
Advanced Usage
No advanced usage code examples are provided in the original document, so this part is skipped.
đ Documentation
Dataset
The dataset the model is trained on is the VU Amsterdam Metaphor Corpus that was annotated on a word - level following the metaphor identification protocol. The training corpus is restricted to English, however, XLM - R shows decent zero - shot performances when tested on other languages.
Results
Following the evaluation criteria from the 2020 Second Shared Task on Metaphor detection our model achieves a F1 - Score of 0.76 for the metaphor - class when training XLM - RBase and 0.77 when training XLM - RLarge.
We train for 8 epochs loading the model with the best evaluation performance at the end and using a learning rate of 2e - 5. From the allocated training data 10% are utilized for validation while the final test set is being kept separate and only used for the final evaluation.
Code for Training and Reference
The training and evaluation code is available on [Github](https://github.com/lwachowiak/Multilingual - Metaphor - Detection/).
Our [paper](https://aclanthology.org/2022.flp - 1.7/) describing training and model application is available online:
@inproceedings{wachowiak2022drum,
title={Drum Up SUPPORT: Systematic Analysis of Image - Schematic Conceptual Metaphors},
author={Wachowiak, Lennart and Gromann, Dagmar and Xu, Chao},
booktitle={Proceedings of the 3rd Workshop on Figurative Language Processing (FLP)},
pages={44--53},
year={2022}
}
đ§ Technical Details
The model uses the [Huggingface token - classification approach](https://huggingface.co/tasks/token - classification) to perform metaphor detection at the token level. It fine - tunes the XLM - RoBERTa model. The training process involves 8 epochs, a learning rate of 2e - 5, and 10% of the training data for validation.
đ License
The license for this project is cc - by - nc - sa - 3.0.
Information Table
Property |
Details |
Model Type |
Fine - tuned XLM - RoBERTa for metaphor detection |
Training Data |
VU Amsterdam Metaphor Corpus (restricted to English) |
Metrics |
F1, accuracy |
License |
cc - by - nc - sa - 3.0 |
Widget Examples
Example Title |
Text |
Metaphoric1 |
"We are at a relationship crossroad" |
Literal1 |
"The car waits at a crossroad" |
Metaphoric2 |
"I win the argument" |
Literal2 |
"I win the game" |