- WebQuestionSP:Same as the original WebQuestionSP QA dataset.
- CWQ: Same as the original CWQ dataset.
- Setup Freebase: We use the whole freebase as the knowledge base. Please follow Freebase-Setup to build a Virtuoso for the Freebase dataset.
- To improve the data accessing efficiency, we extract a 2-hop topic-centric subgraph for each question in WebQSP and a 4-hop topic-centric subgraph for each question in CWQ to create relatively small knowledge graphs. We extract these small knowledge graphs following NSM. You can download the graphs from here.
python run_preprocess.py
python run_train_retriever.py
python run_retrieve_subgraph.py
python run_train_nsm.py
python run_retriever_finetune.py
./run.sh