Skip to content

Implementation of Amazon Alexa - E2E Entity Resolution and Question Answering

License

Notifications You must be signed in to change notification settings

edwinthomas444/knowledge-graph-question-answering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E2E Knowledge Graph Question Answering

License: MIT

Table of Contents

About

A PyTorch Implementation of Knowledge Graph Question Answering (KGQA) based on Amazon Alexa - E2E Entity Resolution and Question Answering.

The RIGEL model consists of two major components:

  1. Entity Resolution: Detect Spans from Natural Language Queries and ground them to Knowledge Graph entities.

  2. Inference Module: Learn to model relationships to traverse through the Knowlege Graph to obtain answers for the query.

    Inference Module Example Follow Operation (2-hop)
    Inference Module Example Inference multi-hop

Getting Started

Installing the requirements

Clone the repo and install requirements.txt in a Python>=3.7.0 environment, including PyTorch>=1.7.

Use the below command to recursively install all the requirements:

>> pip install -r requirements.txt

Training

The config file under ./configs/ is used to set the hyperparameters for model training and checkpoint paths.

To run train use the following command within the environment:

python .\train.py --config './configs/base.json'

Inferencing

The config file under ./configs/ is used to set the hyperparameters for innitializing model checkpoints and the question to inference.

To run train use the following command within the environment:

python .\inference.py --config './configs/base.json'

A screenshot of single query inferencing is show below:

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

No releases published

Packages

No packages published

Languages