Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
屠明 81ecb13774 | 4 years ago | |
---|---|---|
Core | 4 years ago | |
DataUtils | 4 years ago | |
pytorch_pretrained_bert | 4 years ago | |
pytorch_transformers | 4 years ago | |
LICENSE.txt | 4 years ago | |
NERExtractorTest.py | 4 years ago | |
README.md | 4 years ago | |
combine_pred.py | 4 years ago | |
dataloader.py | 4 years ago | |
dataset.py | 4 years ago | |
docfilter.py | 4 years ago | |
hotpotqa_loader.py | 4 years ago | |
hotpotqa_utils_joint.py | 4 years ago | |
main.py | 4 years ago | |
modeling_hotpotqa.py | 4 years ago | |
prepare_pred_gold.py | 4 years ago | |
prepro.py | 4 years ago | |
requirements.txt | 4 years ago | |
run_hotpotqa_roberta.py | 4 years ago | |
utils_hotpotqa.py | 4 years ago |
Code for AAAI 2020 paper "Select, Answer and Explain: Interpretable Multi-hop Reading Comprehension over Multiple Documents"
Based on PyTorch
Evaluation code for SAE-large on HotpotQA leaderboad with pretrained models.
git clone
Install PyTorch. The code has been tested with PyTorch >= 1.1
Install the requirements
python -m spacy download en_core_web_sm
Download pretrained models. Put zip file into the same folder with main.py
, and unzip it.
Create a directory output
in the same folder with main.py
and then run
python main.py input_file
input_file
can be HotpotQA dev file or other data sets organized in the same format with HotpotQA.
By default, the code uses the 0th GPU but you can change it the main.py
.
The final prediction pred.json
will be in the output
folder.
@inproceedings{tu2020sae,
title={Select, Answer and Explain: Interpretable Multi-hop Reading Comprehension over Multiple Documents},
author={Tu, Ming and Huang, Kevin and Wang, Guangtao and Huang, Jing and He, Xiaodong and Zhou, Bowen},
booktitle={{AAAI 2020 (accepted)}},
year={2020}
}
该项目开源了一种可解释的、高效的多文档阅读理解算法SAE(Select, Answer and Explain)。该算法通过选择、回答和解释来对多个信息源进行推理,并通过提供支持证据来解释答案预测。具体地,SAE算法首先过滤掉与答案无关的文件, 从而减少干扰信息的数量。然后将选定与答案相关的文档输入到一个模型中, 预测答案和提供支持的句子。 该模型在答案预测的单词级别和支持句子预测的句子级别同时优化了多任务学习目标, 并通过注意力机制实现了这两个任务的交互。
Python Text
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》