Skip to content

Efficient Interactive SPARQL Query Construction in Semantic Question Answering Systems

License

Notifications You must be signed in to change notification settings

AskNowQA/InteractiveQA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive QA (IQA)

IQA is an interactive framework to construct SPARQL Query from a natural language question.

While IQA interactive schema is generally able be implemented using an arbitrary semantic question answering pipeline, this repository provides a concrete realization of IQA using following external components:

  1. MDP-Parser: that acts as the shallow parser to extract the mentions of entity and relations from the input question.
  2. EARL is a entity/relation linker that provides a list of candidate linked item for each entity/relation mention from the previous step. A demo version is available at http://earldemo.sda.tech/ .
  3. SQG is a query building component that produces a list of candidate queries given the candidate linked items and the input question. It alo has a ranking mechanism to arrange the candidate queries in respect to their structural similarity to the input question.

Getting Started

  • Please install Python 3.7 and the required packages as listed in here.
  • Please follow the documentation of the aforementioned components to get them running.
  • Update the config.py to point the web service of the components.
  • run python scripts/service/backend.py --base_path . .
  • run python UI/app.py --base_path . --port 5001 .
  • Now you can navigate to http://localhost:5001/ and check out the web based user interface.

Data

Please find all required data at: http://tiny.cc/IQA-Data

data
└LC-QuAD (Benchmarkin dataset)
│   │   linked.json (Original)
│   │   linked_IOB.pk (IOB format to train the parser)
│   └───EARL (cached the output of EARL using various parser)
│       │   output_nltk.json (nltk based parser)
│       │   output_gold.json (gold annotations)
│       │   output_gold_EARL_ER_PRED.json (default)
└output
│   │  wd_perf.json
│   │  stats-general.json (detailed results for oracle evaluation)
│   │  gold_answer.pk (Gold answers for LC-QuAD dataset)
│   └───pipeline (Full interpretation space for all LC-QuAD questions)
│       │   fbc52b963d5141a6b89216bae276bf21.pickle ({questionid}.pickle)
│       │   ...

License

This program is subject to the terms of the General Public License (GPL), Version 3.0.

About

Efficient Interactive SPARQL Query Construction in Semantic Question Answering Systems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •