Giter Club home page Giter Club logo

edgqa's Introduction

EDGQA

Codes for ISWC 2021 research track paper "EDG-based Question Decomposition for Complex Question Answering over Knowledge Bases".

What is EDGQA?

EDGQA is a QA system over knowledge bases based on Entity-Description Graphs (EDGs). Currently EDGQA has been implemented for DBpedia, tested on LC-QuAD 1.0 and QALD-9.

image-20210707111759566

The above figure shows SPARQL (a. and c.) and EDG (b. and d.) on two exemplar natural language questions. The dashed line connects a description to an intermediate entity. The types of nodes and edges of EDG is defined as follows.

image-20210707111936154

By generating such EDGs, questions are represented as a combination of entities and their description, providing a structure for understanding and answering complex questions. More information are detailed in our paper.

1. Requirements

  • JDK 1.8.0
  • Maven
  • python 3.6

Knowledge base dumps and linking systems are also needed.

1.1 Knowledge Base

In EDGQA, DBpedia 1604 (for lcquad) and DBpedia 1610 (for qald-9) is stored in Virtuoso.

You can deploy the dbpedia locally or use the online endpoint (can be incompatible to the datasets). Then fill the server address and port in src/main/java/cn/edu/nju/ws/edgqa/utils/kbutil/KBUtil.java.

1.2 Linking tools

Earl, Falcon, Dexter are used in EDGQA.

See directory linking_tools, and follow the instructions to set up the three linking systems. Then fill in the server address and port in src/main/java/cn/edu/nju/ws/edgqa/utils/linking/LinkingTool.java.

For more information:

1.3 Semantic matching models

EDGQA employs bert-based classifier as semantic matching models for relation detection and query reranking.

See directory models to deploy the models correctly.

2. Program Arguments

2.1 EDGQA Arguments

Program arguments are defined in src/main/java/cn/edu/nju/ws/edgqa/main/QAArgs.java.

Running settings for Intellij IDEA 2019.3 above versions are stored in EDGQA/.run.

Run src/main/java/cn/edu/nju/ws/edgqa/main/EDGQA.java by following CLI arguments:

-d --dataset: 'lc-quad', 'qald-9'
-tr --train: 'true' for training set, 'false' for test set
-r --run: 'autotest', 'single', or 'serial_number'
-uc --use_cache: 'true' for using linking cache, 'false' otherwise
-cc --create_cache: 'true' for creating linking cache, 'false' otherwise
-gll --global_linking: 'true' for using global linking, 'false' otherwise
-lll --local_linking: 'true' for using local linking, 'false' otherwise
-qd --question_decomposition: 'true' for using EDG to decompose the question
-rr --reranking: 'true' for re-ranking by EDG block, 'false' otherwise

Because the linking tools consume a lot of time, caching the linking results of the test queries helps improve the speed of the test. The cache needs to be built the first time the QA is run and is available when it is run again. Use the arguments use_cache and create_cache above to set the cache tool.

[Optional] The cache of linking results is available on this Google Drive dir. Please set it to the current directory, i.e., EDGQA/cache. It is optional for running EDGQA.

2.2 PointerNetwork Arguments

Run cn/edu/nju/ws/edgqa/handler/PointerNetworkQA.java by following CLI arguments:

--dataset: 'lc-quad', 'qald-9'

3. Resources

4. Contact

Feel free to create a GitHub Issue or send an e-mail. We look forward to receiving your feedback.

edgqa's People

Contributors

yhshu avatar hxx97 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.