Tensorflow based implementation of deep siamese LSTM network to capture phrase/sentence similarity using character/word embeddings
Tensorflow based implementation of deep siamese LSTM network to capture phrase/sentence similarity using character/word embeddings
This project is a prototype for experimental purposes only and production grade code is not released here.
It is a tensorflow based implementation of deep siamese LSTM network to capture phrase/sentence similarity using character embeddings.
This code provides architecture for learning two kinds of tasks:
Phrase similarity using char level embeddings [1]
Sentence similarity using word level embeddings [2]
For both the tasks mentioned above it uses a multilayer siamese LSTM network and euclidian distance based contrastive loss to learn input pair similairty.
Given adequate training pairs, this model can learn Semantic as well as structural similarity. For eg:
Phrases :
For phrases, the model learns character based embeddings to identify structural/syntactic similarities.
Sentences :
(More examples Ref: semEval dataset)
For Sentences, the model uses pre-trained word embeddings to identify semantic similarities.
Categories of pairs, it can learn as similar:
Phrases:
https://github.com/dhwajraj/dataset-person-name-disambiguation
"person_match.train" : https://drive.google.com/open?id=1HnMv7ulfh8yuq9yIrt_IComGEpDrNyo-
Sentences:
"train_snli.txt" : https://drive.google.com/open?id=1itu7IreU_SyUSdmTWydniGxW-JEGTjrv
This data is generated using SNLI project :
alternate download location for "wiki.simple.vec" is : https://drive.google.com/open?id=1u79f3d2PkmePzyKgubkbxOjeaZCJgCrt
…$ python eval.py --model graph#.pbPhrases:
Sentences:
No open issues yet, or sync has not completed.