百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

GEAR

> 编程语言
开源

ACL 2019 论文 "GEAR: 基于图的事实验证证据聚合和推理"源代码

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

ACL 2019 论文 "GEAR: 基于图的事实验证证据聚合和推理"源代码

GEAR

Source code and dataset for the ACL 2019 paper "GEAR: Graph-based Evidence Aggregating and Reasoning for Fact Verification".

Requirements:

Please make sure your environment includes:

python (tested on 3.6.7)
pytorch (tested on 1.0.0)

Then, run the command:

bash
pip install -r requirements.txt

Evidence Extraction

We use the codes from Athene UKP TU Darmstadt in the document retrieval and sentence selection steps.

Our evidence extraction results can be found in Tsinghua Cloud or Google Cloud.

Download these files and put them in the data/retrieved/ folder. Then the folder will look like

data/retrieved/
    train.ensembles.s10.jsonl
    dev.ensembles.s10.jsonl
    test.ensembles.s10.jsonl

Data Preparation

bash
# Download the fever database
wget -O data/fever/fever.db https://s3-eu-west-1.amazonaws.com/fever.public/wiki_index/fever.db

# Extract the evidence from database
cd scripts/
python retrieval_to_bert_input.py

# Build the datasets for gear
python build_gear_input_set.py

cd ..

Feature Extraction

First download our pretrained BERT-Pair model (Tsinghua Cloud or Google Cloud) and put the files into the pretrained_models/BERT-Pair/ folder.

Then the folder will look like this:

pretrained_models/BERT-Pair/
    	pytorch_model.bin
    	vocab.txt
    	bert_config.json

Then run the feature extraction scripts.

bash
cd feature_extractor/
chmod +x *.sh
./train_extracor.sh
./dev_extractor.sh
./test_extractor.sh
cd ..

GEAR Training

bash
cd gear
CUDA_VISIBLE_DEVICES=0 python train.py
cd ..

GEAR Testing

bash
cd gear
CUDA_VISIBLE_DEVICES=0 python test.py
cd ..

Results Gathering

bash
cd gear
python results_scorer.py
cd ..

Cite

If you use the code, please cite our paper:

@inproceedings{zhou2019gear,
  title={GEAR: Graph-based Evidence Aggregating and Reasoning for Fact Verification},
  author={Zhou, Jie and Han, Xu and Yang, Cheng and Liu, Zhiyuan and Wang, Lifeng and Li, Changcheng and Sun, Maosong},
  booktitle={Proceedings of ACL 2019},
  year={2019}
}

Issues· 7 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言