Go to file
knightmarehs 821359c6bc Update gAnswer_help.pdf 2019-01-25 12:43:37 +08:00
docs Update gAnswer_help.pdf 2019-01-25 12:43:37 +08:00
src Update GanswerHttp.java 2019-01-24 17:12:54 +08:00
.gitignore Initial commit 2018-12-13 22:25:36 +08:00
LICENSE Initial commit 2018-12-13 22:25:36 +08:00
README.md Update README.md 2019-01-24 19:28:25 +08:00
README_EN.MD Update README_EN.MD 2019-01-23 10:51:56 +08:00

README_EN.MD

GAnswer System

GAnswer system is a natural language QA system developed by Institute of Computer Science & Techonology Data Management Lab, Peking University, led by Prof. Zou Lei. GAnswer is able to translate natural language questions to query graphs containing semantic information. Then, the system can further turn query graphs into standard SPARQL query, which will be executed in graph databases, in order to attain answers for the users. We apply an innovative data-driven method for semantic disambiguation. In details, while generating query graphs, we maintain multiple plans for entities and predicate mappings and we conduct semantic disambiguation in the query execution phrase according to entities and predicate matches ( incorrect mappings ).

This is an implementation for TKDE 2018 paper Answering Natural Language Questions by Subgraph Matching over Knowledge Graphs

For help document, click here 中文(ZH), the english version will be uploaded as soon as possible

Quick Start

First you must download necessary data files dbpedia16.rar here. The extaction code is 1mcr. You should unzip the file into directory named data.

Deploy GAnswer via jar

We recommend you to deploy GAnswer using the jar files we supply. The specific procedure is as follows

  • Download 2 files: Ganswer.jar and dbpedia16.rar. We strongly recommend that you download the up-to-date version of Ganswer.jar from the github releases of this project, to ensure stability.
  • Unzip Ganswer.jar
jar -xvf Ganswer.jar
  • You should unzip it into the main project directory. Please make sure that Ganswer.jar itself is under the same path with the unzipped files.
  • Unzip dbpedia16.rar. Note that you must place the unzipped files into a directory named data, and this directory should be under the same path with
unrar x dbpedia16.rar ./data/
  • In other words, your project directory should look like this:

Main_project_directory

Ganswer.jar
unzipped files from Ganswer.jar
data

unzipped files from dbpedia16.rar

  • Run the jar file
java -jar Ganswer.jar
  • Wait for the initialization procedure. When you see "Server Ready!", the initialization is successful and you can access GAnswer service via Http requests.

About GAnswer Http API, information can be found in Chapter 2.1.1 in help document.

Run GAnswer in Eclipse

If you would like to run GAnswer in Eclipse, you need to clone or download the source code and import the project into Eclipse. Afterwards, the jar files in lib directory should be added to Build Path. Due to the sizes, these jar files can not be uploaded to github. Therefore, you can download them here. The extract code is ud2v. Meanwhile, dbpedia16.rar is also needed. Please unzipped it into directory named data under the project main directory. Parameters about data path can be found in qa.Globals.localPath.

Notice

To run GAnswer, you have to deal with multiple dependencies involving jar, data files and external API. Related information is in Chapter 2.4 in the help document.

Other Business

You are welcome to use GAnswer and tell us your valuable advice or bug report.

If your advice or report are accepted, your contribution will be recorded in our help document.

We have published some paper about GAnswer and QA task, which you can find in Chapter 3.2 in help document.