Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ad-freiburg/aqqu
More Accurate Question Answering on Freebase
https://github.com/ad-freiburg/aqqu
Last synced: 3 months ago
JSON representation
More Accurate Question Answering on Freebase
- Host: GitHub
- URL: https://github.com/ad-freiburg/aqqu
- Owner: ad-freiburg
- Created: 2015-09-11T10:25:38.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-06T21:18:16.000Z (over 1 year ago)
- Last Synced: 2024-06-29T06:33:17.504Z (4 months ago)
- Language: Python
- Size: 12.7 MB
- Stars: 106
- Watchers: 9
- Forks: 36
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-kbqa - [code
README
# Aqqu Question Answering System
This is an ancestor of the code accompanying the publication: [More Accurate
Question Answering on Freebase, Hannah Bast and Elmar Haussmann, CIKM 2015](https://ad-publications.cs.uni-freiburg.de/freebase-qa.pdf)The original version can be found as as the very first commit of this
repository and under the v1.0 tag.Follow the instructions below to set up the system. This also includes
descriptions on how to obtain pre-requisite data.Setup is easy if all pre-requisites are met.
## Requirements:
* Docker > 18.09 on 64 bit Linux
* RAM: 40 GB for training the large WebQuestions/WebQSP models
* Disk: about 50 GB for all required data## Setup a Virtuoso Instance with Freebase
To setup a Virtuoso instance with the Freebase data needed for Aqqu we
recommend to follow the instructions at our [Virtuoso with Docker
Compose](https://github.com/ad-freiburg/virtuoso-compose) repository. This will
automatically download the correct version of Freebase and setup Virtuoso with
the exact same settings used by us.## Get the Dataset
All data required for learning can be found under
`/nfs/datastets/aqqu_input_data` when on any of the Chair's computer systems,
all other data is generated automatically.cp -r /nfs/datasets/aqqu_input_data/* input/
Outside our system's please contact [Prof. Hannah
Bast](http://ad.informatik.uni-freiburg.de/contact). with the above path to get
a download.## Train with the provided script
When using docker/wharfer with user namespaces you may need to first run
`chmod o+wX data` so Aqqu running inside docker can write data even if it is
a very restricted user like `nobody`./build_and_run.sh train -n -r
## Run with the provided script
./build_and_run.sh backend -n -r -p
## Debug changes with the provided script
The `backend` command does not rebuild the image but reuses the exact image
used for training. Therefore changes to the source code made after the train
step are not reflected in the behavior of `backend`.To try out changes **without affecting the train/backend** image use the debug
command../build_and_run.sh debug -n -r -p
Once the changes have been tested the image used by the `backend` command can
be updated using. *Note* however that this is somewhat dangerous as it does not
work for changes that would make the model incompatible to the trained model../build_and_run.sh update -n
Test the Backend
----------------
The Aqqu backend provides a simple JSON API that can easily be tested using
`curl`. If you have the `./build_and_run.sh backend …` command running on
a server `` with port `` the following asks for Albert Einstein's
place of birthcurl http://:/?q=where%20was%20albert%einstein%20born
## Run Cross Validation with the provided script
./build_and_run.sh cv -n -r
## Overriding parameters
To override certain ranker parameters you can use `--override` with a JSON object as additional argument for example
`--override '{"top_ngram_percentile": 15}'`## Disabling GPU
To disable GPU use run above commands with the environment variable `NO_GPU=1`## Using (nvidia-)docker directly
To use (nvidia-)docker directly refer to the `build_and_run.sh` script. No
additional documentation is provided as this is discouraged the script should
be reasonably easy to follow.