How to use dbpedia spotlight docker image?

dbpedia spotlight python
dbpedia spotlight download
spotlight dbpedia github
demo dbpedia spotlight
dbpedia docker
dbpedia-spotlight local server
docker basics
aws build docker image

I'm facing a problem with dbpedia spotlight. I can't seem to connect to the local docker image found here.

I used the command docker pull dbpedia/spotlight-english with docker run -i -p 2222:80 dbpedia/spotlight-english and then checked that the container is running with docker ps. Everything works fine.

After that, I try to query the server by running the curl given in the spotlight documentation:

curl http://0.0.0.0:2222/en/annotate  \
  --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break
  for students included in last year's economic stimulus package, arguing
  that the policy provides more generous assistance." \
  --data "confidence=0.35"

And the same with the following URLs:

All I get is curl: (52) Empty reply from server.

What am I not getting here? All help appreciated.

The empty reply error indicates that nothing was listening on your local port 2222. This is caused by the docker command docker run -i -p 2222:80 dbpedia/spotlight-english, in which the Spotlight container's port 2222 is mapped to port 80 on the host machine.

With the correct request syntax, as @Sandro has shared, the example should work on a locally running docker container with the url http://localhost:80/rest/annotate (or by omitting the port number altogether, given that 80 is the default).

Run Dbpedia Spotlight From a Docker, Steps: Install docker (e.g. for centos/amazonlinux: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html) Pull the dbpedia spotlight docker: (e.g. docker pull dbpedia/spotlight-english) Run the docker: (e.g. docker run -d -p 8080:80 dbpedia/spotlight-english spotlight.sh) Supported tags and respective Dockerfile links. 0.7; 0.7.1; 1.0; latest; What is DBpedia Spotlight? DBpedia Spotlight is a tool for automatically annotating mentions of DBpedia resources in text, providing a solution for linking unstructured information sources to the Linked Open Data cloud through DBpedia.

The correct is

curl -X POST \
  http://localhost:2222/rest/annotate \
  -H 'accept: application/json' \
  -H 'content-type: application/x-www-form-urlencoded' \
  --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance" \
  --data-urlencode "confidence=0.35"

Installation · dbpedia-spotlight/dbpedia-spotlight Wiki · GitHub, See: Run Dbpedia Spotlight from a Docker; Maven. Our build is mavenized, which means that you can use the scala plugin to run our classes from command line. Docker containers for DBpedia Spotlight. Contribute to dbpedia-spotlight/spotlight-docker development by creating an account on GitHub.

To run the docker image of English version:

  1. docker run -i -p 2222: 80 dbpedia / spotlight-english spotlight.sh

  2. Open the localhost and give the text in the below format: localhost: 2222 / rest / annotate? Text = TextYouWantToAnnotate & confidence = 0.2 & support = 20

Example:

localhost:2222/rest/annotate?text=When I was growing up, my zealously frugal parents refused to buy anything from a bookstore, insisting that the local library had whatever it was we could possibly want to read. Faced with a small child’s intensive lobbying for repeated storytelling sessions with a lavishly illustrated picture book, my father would borrow one from the library and photocopy it. I still remember how anything colorful on the page (i.e. everything) would get transformed into dark blobs, the toner blurring the text and smudging my fingers.&confidence=0.2&support=20

How to use dbpedia spotlight docker image?, The empty reply error indicates that nothing was listening on your local port 2222. This is caused by the docker command docker run -i -p  DBpedia Spotlight. DBpedia Spotlight is a tool for automatically annotating mentions of DBpedia resources in text, providing a solution for linking unstructured information sources to the Linked Open Data cloud through DBpedia.

dbpedia/spotlight-english, Docker container image with DBpedia Spotlight in English. How to run. Assume your docker host is localhost and HTTP public port is 2222 (change these values​  Quickstarter for DBpedia Spotlight Lucene. You can use this repository for creating lucene backend index of DBpedia Spotlight in your language. The repo is ready to use for the follow languages: catalan, german , greek , english, spanish, french , italian, dutch, polish, portuguese, hungarian and russian.

dbpedia/spotlight-italian, Docker container image with DBpedia Spotlight in Italian. How to run. Assume your docker host is localhost and HTTP public port is 2230 (change these values if  Thank you for your response. Unfortunately, we are not allowed to use the docker image and we're pushed with the workaround. Regarding workaround, do you have a very simple step for us to re-compile the dbpedia? Many thanks in advance! As for the enhancement, would you be able to provide timeline? Thank you very much! Jayson

FAQ - DBpedia Spotlight, What is DBpedia Spotlight? Our images are periodically constructed and hosted in the Docker Hub. To use it, follow the steps in How to run section. dbpedia-spotlight-model DBpedia Spotlight is a tool for automatically annotating mentions of DBpedia resources in text. Improving Efficiency and Accuracy in Multilingual Entity Extraction approach

Comments
  • Still getting the "Empty reply from server"
  • My fault. Sorry. I have modified the the answer and now it works
  • I still couldn't get the docker to work but I ran a server manually and the above query works fine. Thank you!