Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run DBPedia Spotlight with local Sparql-Endpoint #39

Open
Livvi opened this issue Dec 4, 2018 · 4 comments
Open

Run DBPedia Spotlight with local Sparql-Endpoint #39

Livvi opened this issue Dec 4, 2018 · 4 comments

Comments

@Livvi
Copy link

Livvi commented Dec 4, 2018

Hi,

I have spent some time reading through all the different wiki pages and tutorials, but I am a bit confused about which possibilities of running DBPedia Spotlight still exist.

I am running my own DBPedia instance on a server using Virtuoso providing me with a local sparql endpoint to access it. I would like to run DBPedia Spotlight and set the sparql endpoint to my local one.

What is the best way to achieve this with the available options for running DBPedia Spotlight?

@sourabhpoddar404
Copy link

Hi,

I have the same use case, facing the same while trying to host a local version of DBpedia spotlight on our endpoint of Dbpedia.

I will really appreciate if anybody can shed some light on this.

Thanks

@Julio-Noe
Copy link
Collaborator

Hi @sourabhpoddar404 ,

If I understand well, the annotations from DBpedia Spotlight must return a predefined URL (the URL from your own DBpedia endpoint, e.g., http://localhost/resource/) instead of the regular https://dbpedia.org/resource/. If that is the case, you could update the class SpotlightConfiguration.java with your default values. For example, change the default NAMESPACE:

String DEFAULT_NAMESPACE = "http://dbpedia.org/resource/";

for something like

String DEFAULT_NAMESPACE = "http://localhost/resource/";

After the corresponding updates, you need to package/install the whole project (mvn clean package or mvn clean install). And run the jar file from the rest folder: ./rest/target/rest-1.1-jar-with-dependencies.jar. For example:

java -Dfile.encoding=UTF-8 -Xmx10G -jar rest-1.1-jar-with-dependencies.jar /path/to/the/language/model http://0.0.0.0:2222/rest

I hope this information helps.

@sourabhpoddar404
Copy link

Hi

Thanks for the reply.
But I guess I was not clear with my issue. I am working with my own version of dbpedia knowledge base(much small in size) and I want to run DBpedia spotlight on my knowledge base (not on complete dbpedia). I am hosting my version of dbpedia knowledge base on my own server, locally on virtuoso. But dbpedia spotlight doesn't have instruction on how to host it with a personalized knowledge base.

Thanks

@Julio-Noe
Copy link
Collaborator

Julio-Noe commented Feb 2, 2022

Hi @sourabhpoddar404 ,

Ok, that's an interesting task, and you are right; there are no instructions to do that. At this moment, there is no implementation with a personalized subset of DBpedia or Wikipedia dump files. The reason is that the language models used by DBpedia Spotlight are produced from the Wikipedia dump files in combination with the DBpedia artifacts of disambiguation, instance-type, and redirects from the DBpedia Databus.

However, you could try to produce your language model based on your version of DBpedia. Possible steps could be the following:

  • Produce the disambiguation, instance-types, and redirects from your local version of DBpedia.
  • Update the code of the index_db.sh file from the model-quickstarter tool to integrate the local disambiguation, instance-types, and redirects (instead of downloading them from the DBpedia Databus).
  • Generate the language model with the updated process
  • Test DBpedia Spotlight with the generated language model

Please, if you implement a local version of DBpedia Spotlight, it would be great if you shared your solution.

Thanks.

UPDATE: maybe you could find useful the project: https://github.com/dbpedia-spotlight/spotlight-model-editor/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants