All Projects → pkumod → Ganswer

pkumod / Ganswer

Licence: bsd-3-clause
A KBQA system based on DBpedia.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Ganswer

Nspm
🤖 Neural SPARQL Machines for Knowledge Graph Question Answering.
Stars: ✭ 156 (-40.23%)
Mutual labels:  question-answering, sparql
AskNowNQS
A question answering system for RDF knowledge graphs.
Stars: ✭ 32 (-87.74%)
Mutual labels:  sparql, question-answering
tg2021task
Participant Kit for the TextGraphs-15 Shared Task on Explanation Regeneration
Stars: ✭ 18 (-93.1%)
Mutual labels:  question-answering
iamQA
中文wiki百科QA阅读理解问答系统,使用了CCKS2016数据的NER模型和CMRC2018的阅读理解模型,还有W2V词向量搜索,使用torchserve部署
Stars: ✭ 46 (-82.38%)
Mutual labels:  question-answering
LSQ
Linked SPARQL Queries (LSQ): Framework for RDFizing triple store (web) logs and performing SPARQL query extraction, analysis and benchmarking in order to produce datasets of Linked SPARQL Queries
Stars: ✭ 23 (-91.19%)
Mutual labels:  sparql
co-attention
Pytorch implementation of "Dynamic Coattention Networks For Question Answering"
Stars: ✭ 54 (-79.31%)
Mutual labels:  question-answering
LinkedDataHub
The Knowledge Graph notebook. Apache license.
Stars: ✭ 150 (-42.53%)
Mutual labels:  sparql
Sessel
Document RDFizer for CouchDB
Stars: ✭ 22 (-91.57%)
Mutual labels:  sparql
Inception
INCEpTION provides a semantic annotation platform offering intelligent annotation assistance and knowledge management.
Stars: ✭ 254 (-2.68%)
Mutual labels:  sparql
MICCAI21 MMQ
Multiple Meta-model Quantifying for Medical Visual Question Answering
Stars: ✭ 16 (-93.87%)
Mutual labels:  question-answering
jarql
SPARQL for JSON: Turn JSON into RDF using SPARQL syntax
Stars: ✭ 19 (-92.72%)
Mutual labels:  sparql
WikidataQueryServiceR
An R package for the Wikidata Query Service API
Stars: ✭ 23 (-91.19%)
Mutual labels:  sparql
cdQA-ui
⛔ [NOT MAINTAINED] A web interface for cdQA and other question answering systems.
Stars: ✭ 19 (-92.72%)
Mutual labels:  question-answering
IGUANA
IGUANA is a benchmark execution framework for querying HTTP endpoints and CLI Applications such as Triple Stores. Contact: [email protected]
Stars: ✭ 22 (-91.57%)
Mutual labels:  sparql
Chinese-Psychological-QA-DataSet
中文心理问答数据集
Stars: ✭ 23 (-91.19%)
Mutual labels:  question-answering
qa
TensorFlow Models for the Stanford Question Answering Dataset
Stars: ✭ 72 (-72.41%)
Mutual labels:  question-answering
productqa
Product-Aware Answer Generation in E-Commerce Question-Answering
Stars: ✭ 29 (-88.89%)
Mutual labels:  question-answering
icebreaker
Web app that allows students to ask real-time, anonymous questions during class
Stars: ✭ 16 (-93.87%)
Mutual labels:  question-answering
Bert Squad
SQuAD Question Answering Using BERT, PyTorch
Stars: ✭ 256 (-1.92%)
Mutual labels:  question-answering
gapbug
QA site with Python/Django
Stars: ✭ 28 (-89.27%)
Mutual labels:  question-answering

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), English

Quick Start

First you must download necessary data files dbpedia16.rar here. The extaction code is 1mcr. This is a Baidu Netdisk link. If you have trouble opening it, please try this google drive link.You should unzip the file into directory named data.Since the complete data require at least 20 GB of main memory, you may try a smaller dataset (5GB required). The extract code is zuue. Please notice that the system performance is limited on the small data. We make sure that this data set is capable for example questions on our official website as well as in QALD data set. Otherwise, you should choose suitable question for testing based on the data files.

For those who want to set up their own gstore service, we also supply dbpedia triple dataset and the extract code is rpev.

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.

Use GAnswer via http request

Here is an example of how to call GAnswer service via http request. Having started GAnswerHttp, you can activate GAnswer by url as follow: http://[ip]:[port]/gSolve/?data={maxAnswerNum:1, maxSparqlNum:2, question:Who is the wife of Donald Trump?}
Here,[ip] and [port] is the ip and port number of GAnswerHttp service (the default port is 9999). By the "data" parameter in the url, you can send a json string to GAnswer. In this example, you are actually sending the following json data:

{
  "maxAnswerNum":"1",
  "maxSparqlNum":"2",
  "question":"Whos is the wife of Donald Trump?"
}

Here, maxAnswerNum and maxSparqlNum respetively limit the number of answers and sparql the system will return. Both of them are optional. If everything goes well, GAnswer will return a json string containing system-generated sparql and corresponding answer.

{
  "question":"Who is the wife of Donald Trump?",
  "vars":["?wife"],
  "sparql":["select DISTINCT ?wife  where { <Donald_Trump>\t<spouse>\t?wife. } LIMIT 1","select DISTINCT ?wife  where { ?wife\t<spouse>\t<Donald_Trump>. } LIMIT 1"],
  "results":{"bindings":[{"?wife":{"type":"uri","value":"<Ivana_Trump>"}}]},
  "status":"200"
}

For more detail, please check Chapter 2.1.1 of the user guide.

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 64jd. You can also download the lib zip through Google Drive. 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. Having generated sparql querires, by default the system will access a remote gStore for answer, which means extra time may be needed.Therefore, we strongly recommend you to deploy gStore on your own server for best performance.

  • Download DBpedia2016 triple file and extract code is 89yy.
  • Deploy gStore and use DBpedia2016 triple file to build your own database. What's worth mentioning is that the DBpedia 2016 triples file is about 9.9GB and the construction needs more than 10GB of main memory and costs more about 10 hours.

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.

How to make your own data available on gAnswer

You may have your own set of triples and want to put them into gAnswer.Then you should generate a new set of fragments from your own triples. We have a detailed tutorial to help you out.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].