A small API server to return entities and other metadata for online news articles.
656
A small API server to return entities and other metadata for online news articles. Originally built to support the Data Against Feminicide project. Technically, this exposes API endpoints that accepts URLs and returns entities in JSON. Uses spaCy under the hood for entity extraction.
Install from Docker: The easiest approach to just start using this is to install the pre-built image from
DockerHub. Set a WEB_CONCURRENCY env var if you want more than one worker.
docker pull rahulbot/news-entity-server:latest
docker run -p 8000:8000 -e MODEL_MODE=small -m 8G news-entity-server:latest
API documentation is available at http://localhost:5000/redoc. See the code in test/test_server.py for examples.
Every endpoint returns a dict like this:
{
"duration": 123,
"status": "ok",
"version": "0.0.1",
"results": { ... }
}
POST a url and language to this endpoint and it returns JSON with all the entities it finds.
Add a title argument, set to 1 or 0, to optionally include the article title in the entity extraction.
POST text and language content to this endpoint, and it returns JSON with all the entities it finds.
POST a url to this endpoint, and it returns just the extracted content from the HTML.
Content type
Image
Digest
sha256:76dd42c1c…
Size
3.5 GB
Last updated
over 1 year ago
docker pull rahulbot/news-entity-server