Code Monkey home page Code Monkey logo

tree-kgqa's Introduction

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).

tree-kgqa's People

Contributors

rashad101 avatar darrenzal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.