Skip to content

RuiMao1988/Sequential-Metaphor-Identification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sequential-Metaphor-Identification

Code for the paper "End-to-End Sequential Metaphor Identification Inspired by Linguistic Theories"

https://www.aclweb.org/anthology/papers/P/P19/P19-1378/

Embeddings

Download glove.840B.300d.zip (https://nlp.stanford.edu/projects/glove/) into glove folder.

Please email terry_mao0513@hotmail.com for ELMo embeddings, putting them into elmo folder.

(The used dataset and ELMo embeddings were cleaned and pre-trained by https://github.com/gao-g/metaphor-in-context.)

Environment

python 3.6

pytorch 0.4.1

pip install -r requirements.txt

Run

Go to the model folder (rnn_hg or rnn_mhca), then run for

  1. VU Amsterdam Metaphor Corpus (VUA ALL POS and VUA VERB in the paper)
python main_vua.py
  1. Mohammad dataset
python main_mohx.py
  1. TroFi dataset
python main_trofi.py

Citation

@inproceedings{mao2019metaphor,
  title={End-to-End Sequential Metaphor Identification Inspired by Linguistic Theories},
  author={Mao, Rui and Lin, Chenghua and Guerin, Frank},
  booktitle={Proceedings of the 57th Conference of the Association for Computational Linguistics},
  pages={3888--3898},
  year={2019}
}

About

Code for the paper "End-to-End Sequential Metaphor Identification Inspired by Linguistic Theories"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages