Skip to content

PyTorch code for the IEEE Access paper: Tree-KGQA: An Unsupervised Approach for Question Answering Over Knowledge Graphs (https://ieeexplore.ieee.org/document/9770789)

License

Notifications You must be signed in to change notification settings

rashad101/Tree-KGQA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tree-KGQA

PyTorch code for the IEEE Access paper: Tree-KGQA: An Unsupervised Approach for Question Answering Over Knowledge Graphs [PDF].

Python 3.8 PyTorch MIT License

⚙️ Installation

Required : Anaconda

conda create -n treekgqa -y python=3.8 && source activate treekgqa
pip install -r requirements.txt
chmod +x setup.sh
./setup.sh

Note: the code require more cleaning.

🔧 Pre-processing

We use Wikidata entities provided by ELQ . In order to perform inference, first index the Wikidata entities by executing the follwing command:

python utils/indexer.py --output_path data/wikidata/indexed_wikidata_entities.pkl --faiss_index hnsw --save_index

Indexing might take few hours depending on the system capabilities and resource.

🎯 Inference

To test entity linking on the webqsp dataset run the following command:

python -u run_kgqa.py --dataset webqsp --task EL --use_api --use_indexing --QAtype complex --evaluate

📜 License

MIT

📝 Citation

@ARTICLE{9770789,
    author={Rony, Md Rashad Al Hasan and Chaudhuri, Debanjan and Usbeck, Ricardo and Lehmann, Jens},
    journal={IEEE Access}, 
    title={Tree-KGQA: An Unsupervised Approach for Question Answering Over Knowledge Graphs}, 
    year={2022},
    volume={10},
    number={},
    pages={50467-50478},
    doi={10.1109/ACCESS.2022.3173355}
  }

Contact

For further information, contact the corresponding author Md Rashad Al Hasan Rony (email).

About

PyTorch code for the IEEE Access paper: Tree-KGQA: An Unsupervised Approach for Question Answering Over Knowledge Graphs (https://ieeexplore.ieee.org/document/9770789)

Topics

Resources

License

Stars

Watchers

Forks