Tswings / QDAMR4QA

Interpretable AMR-Based Question Decomposition for Multi-hop Question Answering
4 stars 0 forks source link

Interpretable AMR-Based Question Decomposition for Multi-hop Question Answering

A code implementation of this paper (IJACI 2022).

QuickStart

  1. Download raw datas from HotpotQA.
  2. Download CoreNLP from https://stanfordnlp.github.io/CoreNLP/history.html
    from stanfordcorenlp import StanfordCoreNLP
    nlp = StanfordCoreNLP(r'stanford-corenlp-full-2018-10-05')
  3. Download a python library amrlib. Follow this tutorial AMRLib to load AMR-parsing model and AMR-to-Text generation model.
stog = amrlib.load_stog_model()  # AMR parsing
gtos = amrlib.load_gtos_model()  # AMR-to-Text generation
  1. Question Decomposition (QD)

    python QD_bridge.py     # QD1 for bridging questions
    python QD_comp.py       # QD2 for comparison/intersection questions
  2. Follow DecompRC to answer all sub-questions and predict the final answer.

Citation

If you use this code useful, please star our repo or consider citing:

@article{deng2022interpretable,
  title={Interpretable AMR-based question decomposition for multi-hop question answering},
  author={Deng, Zhenyun and Zhu, Yonghua and Chen, Yang and Witbrock, Michael and Riddle, Patricia},
  journal={arXiv preprint arXiv:2206.08486},
  year={2022}
}