Pregunta

I get the following error:

org.dbpedia.spotlight.exceptions.ConfigurationException: Cannot find spotter file ../dist/src/deb/control/data/usr/share/dbpedia-spotlight/spotter.dict
    at org.dbpedia.spotlight.model.SpotterConfiguration.<init>(SpotterConfiguration.java:54)
    at org.dbpedia.spotlight.model.SpotlightConfiguration.<init>(SpotlightConfiguration.java:143)
    at org.dbpedia.spotlight.web.rest.Server.main(Server.java:70)

Usage:

java -jar dbpedia-spotlight.jar org.dbpedia.spotlight.web.rest.Server [config file] 

or:

mvn scala:run "-DaddArgs=[config file]"
¿Fue útil?

Solución

Quick solution:

wget http://spotlight.dbpedia.org/download/release-0.5/dbpedia-spotlight-quickstart.zip
unzip dbpedia-spotlight-quickstart.zip
cd dbpedia-spotlight-quickstart/
./run.sh

Explanation:

DBpedia Spotlight looks for ~3.5M things of ~320 types in text and tries to disambiguate them to their global unique identifiers in DBpedia. Therefore it needs data files to accompany its jar. A minuscule example is distributed along with the source, but for real use cases you may need the larger files. After you've downloaded the files, you need to modify the configuration in server.properties with the correct path to the files. The error message you got tells you that one of the necessary files (spotter.dict) could not be found in the path you indicated in your server.properties.

More information available here: https://github.com/dbpedia-spotlight/dbpedia-spotlight/wiki/Run-from-a-JAR

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top