Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
tbright17 9a225df8ed | 4 years ago | |
---|---|---|
LICENSE.txt | 4 years ago | |
README.md | 4 years ago | |
WikiAnalyzerUtils.py | 4 years ago | |
allennlp_lr_scheduler.py | 4 years ago | |
coattn.py | 4 years ago | |
config.py | 4 years ago | |
dev_pred.json | 4 years ago | |
dev_predictions.json | 4 years ago | |
gnn.py | 4 years ago | |
label_smooth_criterion.py | 4 years ago | |
model_graph_comb.py | 4 years ago | |
my_embedding.py | 4 years ago | |
preprocessing_graph_comb.py | 4 years ago | |
requirements.txt | 4 years ago | |
run.py | 4 years ago | |
sort_helper.py | 4 years ago | |
submission68_1.py | 4 years ago | |
trainer_graph_comb.py | 4 years ago | |
vocab.pkl | 4 years ago |
Code for ACL 2019 paper "Multi-hop Reading Comprehension across Multiple Documents by Reasoning over Heterogeneous Graphs"
Based on PyTorch
Evaluation code for HDEGraph on WikiHop leaderboad with pretrained models.
git clone
Install PyTorch. The code has been tested with PyTorch >= 1.0
Install the requirements
Download pretrained models. Put zip file into the same folder with run.py
, and unzip it.
Run
python run.py input_file output_file
input_file
can be WikiHop dev file or other data sets organized in the same format with WikiHop.
output_file
is the file where predictions locate at
@inproceedings{tu2019multi,
title={Multi-hop Reading Comprehension across Multiple Documents by Reasoning over Heterogeneous Graphs},
author={Tu, Ming and Wang, Guangtao and Huang, Jing and Tang, Yun and He, Xiaodong and Zhou, Bowen},
booktitle={Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics},
pages={2704--2713},
year={2019}
}
该项目针对跨文档的多跳阅读理解任务开源了一种新类型的图模型:异构文档-实体网络(Heterogeneous Document-Entity graph)。该算法包含不同粒度级别的信息,包括特定文档上下文、文档和实体, HDEGraph算法使用基于共同注意和自注意的上下文编码器初始化整个HDE 图, 然后通过基于图神经网络的传播算法在整个HDE 图上进行推断过程,从而得到各个结点的最终表示,最终用HDE 图的结点表示对候选答案进行打分,筛选出最终答案。在公开数据集上,HDEGraph算法表现出了优秀的性能。
Pickle Python
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》