Home

Awesome

Modeling Semantic Compositionality with Sememe Knowledge

Code and data for ACL2019 paper Modeling Semantic Compositionality with Sememe Knowledge [pdf].

Requirements

Data

This repo contains three types of data.

Sememe-based Semantic Compositionality Degree

To compare the correlation between human annotated SCD and our proposed sememe-based SCD, please:

cd 'SC Degree'
python test_scd.py

MWE Similarity Computation

We use Wordsim240, Wordsim297 and COS960 to test our models performance on MWE similarity computation task. We remove the words in above three dataset which are not MWEs in our dataset and manually move the MWEs in above three dataset to test set.

To run our four models for training on similarity computation task, you could run the following commands:

SC-AS:

python ps_SC_AS.py

SC-MSA:

python ps_SC_MSA.py

SC-AS+R

python ps_SC_AS_R.py

SC-MSA+R

python ps_SC_MSA_R.py 

To evaluate the learned MWE embeddings, please:

python eval_wordsim.py {saved_MWE_embedding_path} 

MWE Sememe Prediction

To train and test our models on MWE sememe prediction task, you could run the following commands:

SC-AS:

python sem_SC_AS.py

SC-MSA:

python sem_SC_MSA.py

SC-AS+R

python sem_SC_AS_R.py

SC-MSA+R

python sem_SC_MSA_R.py 

Cite

If you use the code or data, please cite this paper:

@inproceedings{Qi2019ModelingSC,
title={Modeling Semantic Compositionality with Sememe Knowledge},
author={Fanchao Qi and Junjie Huang and Chenghao Yang and Zhiyuan Liu and Xiao Chen and Qun Liu and Sun Maosong},
booktitle={Proceedings of ACL 2019}
year={2019}
}