This is the official code of COLING 2022 paper Metaphor Detection via Linguistics Enhanced Siamese Network.
Notice: to train on VUA All and VUA Verb, you need at least 20GB memory of GPU.
-
Download our augmented datasets from https://drive.google.com/file/d/1J15WFvekULkyzeHWJ2VV_HyJzmMPbznV/view?usp=sharing and put in the data directory.
-
Download Pytorch RoBERTa model from Huggingface https://huggingface.co/roberta-base and put in the roberta-base directory.
-
Run the following command for training on VUA All dataset:
python main_vua_all.py
On VUA Verb dataset:
python main_vua_verb.py
On MOH-X:
python main_mohx.py
-
Download our released model weights from https://drive.google.com/file/d/1g4asL3-lAuTUMPfMP98RMGXRVQoKVRc5/view?usp=sharing and put in the checkpoints directory.
-
Run the following command for results on VUA All, genre, POS and zero-shot transfer on TroFi.
python main_vua_all.py --eval
Run the following command for results on VUA Verb.
python main_vua_verb.py --eval