Implementation of Attention-Based Convolutional Neural Network for Semantic Relation Extraction.
- python 3.6
- pytorch 1.3.0
- Download the embedding in the
embedding
folder and useconvert.py
to convert it to theUTF-8
format. - Run the following the commands to start the program.
python run.py
More details can be seen by python run.py -h
.
- You can use the official scorer to check the final predicted result.
perl semeval2010_task8_scorer-v1.2.pl proposed_answer.txt predicted_result.txt >> result.txt
The result of my version and that in paper are present as follows:
paper | my version |
---|---|
0.843 | 0.8156 |
The training log can be seen in train.log
and the official evaluation results is available in result.txt
.
Note:
- Some settings are different from those mentioned in the paper.
- No validation set used during training.
- Just complete the part of general Attention-CNN. WordNet and words around nominals are not used. More details are available in Section 4 in this paper.
- Although I try to set random seeds, it seems that the results of each run are a little different.
- The result of my version is not ideal. Maybe my understanding is wrong. If you find it, please let me know.