tyliupku / WSD_MemNN

The code of paper "Incorporating Glosses into Neural Word Sense Disambiguation".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Word Sense Disambiguation

This repo contains the code and data of the following paper:

"Incorporating Glosses into Neural Word Sense Disambiguation". Fuli Luo, Tianyu Liu, Qiaolin Xia, Baobao Chang, Zhifang Sui. ACL 2018. arXiv

In this paper, we integrate the context and glosses of the target word into a unified framework in order to make full use of both labeled data and lexical knowledge of WSD. Therefore, we propose GAS: a gloss-augmented WSD neural network which jointly encodes the context and glosses of the target word in an improved memory network. We further extend the original gloss of word sense via its semantic relations in WordNet to enrich the gloss information (GAS_ext).


Quick Start

Steps to train and test a model:

  • modify self.GLOVE_VECTOR in path.py: pre-trained word embeddings path (download from: https://nlp.stanford.edu/projects/glove/).
  • modify self.WORDNET_PATH in path.py: wordnet 3.0 database.
  • go to the GAS/ folder and run the following command:
python train.py
  • or go to the GAS_ext/ folder and run the following command:
python train_plus.py
  • All outputs will be stored in tmp/ folder. More specifically, the summary of the model path is tmp/tf.log), and test result path is tmp/result.txt.

Dependencies

lxml==4.2.1
tensorflow_gpu==1.6.0
numpy==1.14.2
nltk==3.2.5
beautifulsoup4==4.6.0
tensorflow==1.9.0

Cite

If you use this code, please cite the following paper:

@InProceedings{P18-1230,
  author = 	"Luo, Fuli
		and Liu, Tianyu
		and Xia, Qiaolin
		and Chang, Baobao
		and Sui, Zhifang",
  title = 	"Incorporating Glosses into Neural Word Sense Disambiguation",
  booktitle = 	"Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
  year = 	"2018",
  publisher = 	"Association for Computational Linguistics",
  pages = 	"2473--2482",
  location = 	"Melbourne, Australia",
  url = 	"http://aclweb.org/anthology/P18-1230"
}

About

The code of paper "Incorporating Glosses into Neural Word Sense Disambiguation".


Languages

Language:Python 96.9%Language:Java 3.0%Language:Shell 0.2%