The goal of answer selection is to find the correct answer to a given question from a set of possible answers. Correct answers are possible. In contrast to previous research, which has typically focused on the semantic similarity between a question and its answer. We hypothesize that the question-answer. Pairs are frequently analogical to one another. We will use analogical inference. In this case, we pro- pose a framework and a neural network architecture for dedicated learning. Sentence embeddings that preserve analogical relationships semantic properties in the semantic space. We assess on benchmark datasets, the proposed method for answering questions and demonstrating that our analogical properties are captured better by sentence embeddings than by conventional embeddings, and analogy-based question answering outperforms a comparable similarity-based technique. LSTM and Bert were applied on the SQuad Dataset which was used in the making of this project.
On applying the BERT Algorithm on the SQuad Dataset, we obtained the exact match EM score, which is the number of answers that are exactly correct in range of (0,1), the highest being 1. The highest F1 Score for dataset is 0.66%. We employed Deep Learning to put our dataset to the test, employing the Long Short Term Memory (LSTM) network which had five layers: embedding, dense, input, bidirectional and flatten. The network is trained for 10, 25, 50 and 100 epochs, with 300 batches. The highest accuracy obtained is 96.89% for a batch size of 300 with 10 epochs. Our proposed method can reach significantly better accuracy which demonstrates the superiority of Deep Learning approach.