Skip to content
Siamese Recurrent Neural network with LSTM for evaluating semantic similarity between sentences.
OpenEdge ABL Python
Branch: master
Clone or download
Latest commit 56cd9ba Jul 27, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples ex3 Jun 3, 2016
README.md readme Jun 5, 2016
SiameseLSTM.py train Mar 30, 2016
bestsem.p up_weights Mar 29, 2016
dwords.p dw Jun 5, 2016
kaggle.p sentiment Apr 20, 2016
lstm.py Update lstm.py Jul 27, 2016
main.py examples May 29, 2016
mainmodel.py k Mar 30, 2016
semtest.p data Mar 28, 2016
semtrain.p data Mar 28, 2016
sentences.py sts Jun 5, 2016
sentiment.py sen Apr 20, 2016
stsallrmf.p sts Jun 5, 2016
synsem.p Done Mar 29, 2016

README.md

Siamese-LSTM

Download the word2vec model from https://code.google.com/archive/p/word2vec/ and download the file: GoogleNews-vectors-negative300.bin.gz Set training=False if you want to load trained weights Files:

  1. semtrain.p- training data (SemEval 2014)
  2. semtest.p- testing date (SemEval 2014)
  3. stsallrmf.p- all STS data.

Scripts: (in examples folder)

  1. example1.py : Load trained model to predict sentence similarity on a scale of 1.0-5.0
  2. example2.py : Load trained model and check Pearson, Spearman and MSE.
  3. example3.py : Train the model (takes a long time to compile gradients)
  4. examples.ipynb : explanation of the MaLSTM code (iPython notebook)

Mueller, J and Thyagarajan, A. Siamese Recurrent Architectures for Learning Sentence Similarity. Proceedings of the 30th AAAI Conference on Artificial Intelligence (AAAI 2016). http://www.aaai.org/ocs/index.php/AAAI/AAAI16/paper/view/12195

You can’t perform that action at this time.