Skip to content

Code for our CIKM'18 paper "TEQUILA: Temporal Question Answering over Knowledge Bases"

Notifications You must be signed in to change notification settings

zhenjia2017/TEQUILA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TEQUILA + TempQuestions

Description

This repository contains the code and data for our CIKM'18 short paper. In this paper, we present TEQUILA, an enabler method for temporal QA that can run on top of any KB-QA engine. TEQUILA has four stages. It detects if a question has temporal intent. It decomposes and rewrites the question into non-temporal sub-questions and temporal constraints. Answers to sub-questions are then retrieved from the underlying KB-QA engine. Finally, TEQUILA uses constraint reasoning on temporal intervals to compute final answers to the full question. Comparisons against state-of-the-art baselines show the viability of our method.

example

An example of TEQUILA pipeline including the steps of "decompose and rewrite", "answer sub-questions", and "reason on time intervals".

For more details see our paper: TEQUILA: Temporal Question Answering over Knowledge Bases and visit our project website: https://tequila.mpi-inf.mpg.de.

Requirements

Usage

The system contains two parts:

  • tequila-front: it realizes the functions of detecting temporal questions, decomposing and rewriting sub-questions, and reasoning, and it is implemented in JAVA.
  • backend: it provides the underlying KBQA service and a plug-in for the service to answer sub-questions and retrieve dates related to candidate answers. Backend is implemented in Python.

backend

We use AQQU as the underlying KB-QA system, you should install AQQU first and then copy the following two files into the "data" directory.

  • temporal-predicate-pairs
  • stop-words

After installing AQQU, please replace the modules with the following files:

  • query_translator.translator.py
  • query_translator.data.py
  • query_translator.query_candidate.py

Change the base file path in config.cfg according to your system.

Start the underlying QA service using the following command:

python TEQUILA_AQQU_backend.py

tequila-front

The file "QuestionAnswer.java" in "org.tempo.testsample" provides an example to take the question with parameters as the input, access the underlying QA service, return the results including answers and other intermediated results in a JSON object.

The definition of the parameters are in "org.tempo.Util". You should set global configurations (CGlobalConfiguration.java) such as the gloabal source folder or the base file path, etc. according to your system.

If you want to reproduce the system without installing AQQU, you can set the parameter "qaMode" with "OFFLINE". TEQUILA provides the sub-question answers files (TempQuestions_allsubquestion_aqqu.txt and TempQuestions_allsubquestion_quint.txt) for the questions in TempQuestions Dataset.

The following files required are provided in "source\dictionary" directory:

  • temporal-predicate-pairs: temporal predicate pairs
  • event_dictionary_only.txt: event dictionary
  • TempQuestions_allsubquestion_aqqu.txt: answers to sub-questions from AQQU
  • TempQuestions_allsubquestion_quint.txt: answers to sub-questions from QUINT

If you use this code, please cite:

@inproceedings{jia:18b,
 author = {Jia, Zhen and Abujabal, Abdalghani and Saha Roy, Rishiraj and Str\"{o}tgen, Jannik and Weikum, Gerhard},
 title = {{TEQUILA: Temporal Question Answering over Knowledge Bases}},
 booktitle = {Proceedings of the 27th ACM International Conference on Information and Knowledge Management},
 series = {CIKM '18},
 year = {2018},
 isbn = {978-1-4503-6014-2},
 location = {Torino, Italy},
 pages = {1807--1810},
 numpages = {4},
 url = {http://doi.acm.org/10.1145/3269206.3269247},
 doi = {10.1145/3269206.3269247},
 acmid = {3269247},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {question answering, question decomposition, temporal questions},
}

If you face any issues when using the code please feel free to contact Zhen Jia ([email protected]), Rishiraj Saha Roy ([email protected]) or Gerhard Weikum ([email protected]).

About

Code for our CIKM'18 paper "TEQUILA: Temporal Question Answering over Knowledge Bases"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published