Skip to content

3 Running the webservice

Diego Moussallem edited this page Jan 12, 2017 · 23 revisions

Run your own webservice

  1. Download AGDISTIS
git clone https://github.com/AKSW/AGDISTIS.git
  1. The important data for runnning AGDISTIS on DBpedia is stored in a Lucene 4.4 Index. You should download one of the following indizes into you AGDISTIS clone:
cd AGDISTIS
wget http://titan.informatik.uni-leipzig.de/rusbeck/agdistis/en/indexdbpedia_en_2014.7z
wget http://titan.informatik.uni-leipzig.de/rusbeck/agdistis/de/indexdbpedia_de_2014.7z
wget http://titan.informatik.uni-leipzig.de/rusbeck/agdistis/zh/indexdbpedia_zh_2014.7z

Newest indexex from DBpedia dump 2016-04. Note, Chinese index could not be created because there are missing files from DBpedia dump.

cd AGDISTIS
wget http://titan.informatik.uni-leipzig.de/dmoussallem/indexdbpedia_en_2016.zip
wget http://titan.informatik.uni-leipzig.de/dmoussallem/indexdbpedia_de_2016.zip
  1. Edit the src/main/resources/config/agdistis.properties file according to your settings.

  2. For running AGDISTIS on your machine go to the root directory of AGDISTIS and execute

mvn tomcat:run 

Now a webservice is running on localhost:8080

Running with Docker

  1. Pull image from docker hub using docker pull aksw/agdistis (https://hub.docker.com/r/aksw/agdistis/)
  2. Download (see above) or build an index and rename it if needed to index
  3. Run AGDISTIS while attaching an index as volume using docker run -d -p 8080:8080 -v `pwd`/index:/usr/local/tomcat/index aksw/agdistis

Create your own docker image

  1. Clone this repo
  2. Build application war by running mvn package -Dmaven.test.skip=true
  3. Build docker image by running docker build -t aksw/agdistis .

Running from source in Java

The easiest way of running AGDISTIS from source is to have a look at the Java Class AGDISTISTest.java.

Create your own index

To create your own index you have to git clone AGDISTIS and additionally files for your ontology comprising rdf:type, rdfs:label and meaning full object properties.

For example, download all files for a DBpedia 2014 index with this script

wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/en/instance_types_en.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/en/mappingbased_properties_en.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/en/specific_mappingbased_properties_en.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/en/disambiguations_en.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/en/labels_en.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/en/redirects_transitive_en.ttl.bz2

or for German DBpedia:

wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/de/instance_types_de.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/de/mappingbased_properties_de.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/de/specific_mappingbased_properties_de.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/de/disambiguations_de.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/de/labels_de.ttl.bz2
wget http://data.dws.informatik.uni-mannheim.de/dbpedia/2014/de/redirects_transitive_de.ttl.bz2

The chinese DBpedia version 2014 is incomplete as of 09/16/2014. Therefore, we provide the needed files on our server and some on the central DBpedia server. (disambiguations_zh.ttl is missing at all):

wget http://titan.informatik.uni-leipzig.de/rusbeck/agdistis/zh/zh_resources_files_for_index_v2014.zip.zip

Afterwards you need to configure the config/agdistis.en.properties file according to your prefered knowledge base. Especially, configure those two lines:

folderWithTTLFiles=</Path/to/folder>
surfaceFormTSV=</Path/to/folder/surfaceforms/tsv/OPTIONAL>

and then run:

mvn exec:java -Dexec.mainClass="org.aksw.agdistis.util.TripleIndexCreator"

Surface forms are available from here: http://139.18.2.164/rusbeck/agdistis/surfaceforms/

These files were created by D. Gerber (http://aksw.org/Projects/BOA.html)

If you have any issues, please let us know!

Clone this wiki locally