Skip to content

Latest commit

 

History

History
executable file
·
39 lines (34 loc) · 1.72 KB

README.md

File metadata and controls

executable file
·
39 lines (34 loc) · 1.72 KB

QAUniBonn

List of dependencies

Steps of installation

  • Download or clone the repository $ git clone https://github.com/jtrillos/QAUniBonn.git
  • Download and install ElasticSearch
    • Start ElasticSearch $ sudo service elasticsearch start
  • Download and extract the apache-jena-fuseki-3.4.0
    • Go to the config.ttl in the QAUniBonn repository and modify the path in line 21
    • Run Fuseki $ ./fuseki-server -config=/path/to/the/repository/QAUniBonn/Docker/Fuseki_TripleStore/configuration/config.ttl
    • The server starts at http://localhost:3030/
  • Create a virtual environment for Python 2.7 $ virtualenv pythenv --python=python2
    • Run the virtual environment $ source pythenv/bin/activate
    • Install the dependencies $ pip install elasticsearch SPARQLWrapper simplejson gensim pandas flask nltk $ pip install -U scikit-learn
  • Run $ python IndexSDAKG.py to import all the entities and labels of the KG to ElasticSearch (This is needed only when the KG is being updated or it is the first time).
  • Download wiki-en.bin fasttext
    • Move the wiki.en.bin file into the data folder of the project.
  • If there is not data of nltk uncomment the lines 8 - 11 in nerQuestion.py

Run Server:

To run the server

$ python app.py

To run the server in background

$ nohup python app.py &

Example request API:

$ curl -i -H "Content-Type: application/json" -X POST -d '{"question":"Where is SDA?"}' http://localhost:8000/ask