This repo collects and re-produces models related to domains of question answering and machine reading comprehension.
WikiQA, TrecQA, InsuranceQA
cd cQA
bash download.sh
python preprocess_wiki.py
This model is a simple complementation of a Siamese NN QA model with a pointwise way.
python siamese.py --train
python siamese.py --test
This model is a simple complementation of a Siamese CNN QA model with a pointwise way.
python siamese.py --train
python siamese.py --test
This model is a simple complementation of a Siamese RNN/LSTM/GRU QA model with a pointwise way.
python siamese.py --train
python siamese.py --test
All these three models above are based on the vanilla siamese structure. You can easily combine these basic deep learning module cells together and build your own models.
Given a question, a positive answer and a negative answer, this pairwise model can rank two answers with higher ranking in terms of the right answer.
Refer to 《APPLYING DEEP LEARNING TO ANSWER SELECTION:A STUDY AND AN OPEN TASK》
python qacnn.py --train
python qacnn.py --test
Refer to 《A Decomposable Attention Model for Natural Language Inference》
python decomp_att.py --train
python decomp_att.py --test
Refer to 《A COMPARE-AGGREGATE MODEL FOR MATCHING TEXT SEQUENCES》
python seq_match_seq.py --train
python seq_match_seq.py --test
Refer to 《Bilateral Multi-Perspective Matching for Natural Language Sentence》
python bimpm.py --train
python bimpm.py --test
CNN/Daily mail, CBT, SQuAD, MS MARCO, RACE
To be done
To be done
To be done
To be done
Refer to 《QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehension》
For more information, please visit http://skyhigh233.com/blog/2018/04/26/cqa-intro/.