Skip to content

hotpxl/corenlp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoreNLP Server

This is a server wrapper for the Stanford CoreNLP.

Dependencies

For client-side Python script, you need to install Requests.

Stanford CoreNLP is also needed. Just run ./get-corenlp.sh.

If you use Docker, nothing else is needed.

If you decide to install it directly, please take a look at Dockerfile for how to set up from scratch.

Docker usage

With the Dockerfile, you could spawn a Docker container easily.

Run the following command to build.

# Build Docker image.
docker build -t corenlp-server .

Usage

# Run Docker image in a container.
# This will map port 8081 on the host to port 80 inside the container.
docker run -d -p 8081:80 --log-opt max-file=8 --log-opt max-size=8m --name corenlp-server corenlp-server

This will open an HTTP server on port 8081. Try the following for a demonstration. The first request may take longer since the server is loading models.

curl --data 'The quick brown fox jumped over the lazy dog.' 'http://localhost:8081/?properties=%7B%22tokenize.whitespace%22%3A%22true%22%2C%22annotators%22%3A%22tokenize%2Cssplit%2Cpos%22%2C%22outputFormat%22%3A%22json%22%7D'

About

Server wrapper for Stanford CoreNLP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published