Skip to content
dav prz edited this page May 28, 2014 · 10 revisions

Before to install DBpedia Spotlight in your Tomcat server, make sure that you have configured the JVM memory parameters. Basically you must to define the heap size used by the JVM in catalina.sh script (/usr/share/tomcat{version}/bin/catalina.sh). However it is interesting know how to tuning your server. Here you have a good guide that explains how to do it.

Our WAR package includes the DBpedia Spotlight core, a WEB demo application and the index. Together in one package, you have a complete solution for automatically annotating mentions of DBpedia resources. However, this results in a very huge war file. If you are planning to use the Tomcat Web Application Manager to deploy DBpedia Spotlight in your server, please check the max-file-size and max-request-size properties at /usr/share/tomcat{version}-admin/manager/WEB-INF/web.xml file. By default, Tomcat does not accept files larger than 50 mb.

After doing the deploy, you must adjust two files before to start DBpedia Spotlight. Please, follow the steps below.

1 - Adjusting tomcat_spotlight.properties

Using your favorite text editor, please edit the property org.dbpedia.spotlight.config.filename in tomcat_spotlight.properties file. It is available at: /var/lib/tomcat{version}/webapps/dbpedia-spotlight-{i18n language code}/WEB-INF/classes

This property should contains the complete path to the index that is available at /var/lib/tomcat{version}/webapps/dbpedia-spotlight-{i18n language code}/WEB-INF/classes/{i18n language code}

E.g:

Tomcat 7 and English version

org.dbpedia.spotlight.config.filename=/var/lib/tomcat7/webapps/dbpedia-spotlight-en/WEB-INF/classes/en

2 - Adjusting sites.xml file

sites.xml file (available at /var/lib/tomcat{version}/webapps/dbpedia-spotlight-{i18n language code}/config) is used by the WEB demo application to set the endpoint, language and a default text. You should modify it to use your local server, as shown below

E.g: Server name: http://spotlight.sztaki.hu:8080

<sites>
  <site>
    <i18n>en</i18n>
    <language>English</language>
    <url>http://spotlight.sztaki.hu:8080/dbpedia-spotlight-en/rest</url>
    <text>
       Alan Mathison Turing was a British mathematician, logician, cryptanalyst, and computer scientist.
       He was highly influential in the development of computer science, giving a formalisation of the concepts
       of "algorithm" and "computation" with the Turing machine, which can be considered a model of a general 
       purpose computer. Turing is widely considered to be the father of computer science and artificial
       intelligence.
    </text>
  </site>
</sites>

3 - WAR Files

Language Min. memory File
da - Danish 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-da.war
en - English 12 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-en.war
de - German 8 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-de.war
es - Spanish 6 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-es.war
fr - French 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-fr.war
hu - Hungarian 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-hu.war
it - Italian 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-it.war
nl - Dutch 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-it.war
pt - Portuguese 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-pt.war
ru - Russian 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-ru.war
sv - Swedish 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-sv.war
tr - Turkish 4 gb http://spotlight.sztaki.hu/downloads/version-0.1/tomcat/dbpedia-spotlight-tr.war
Clone this wiki locally