Sign inSign up

jpuck/opennlp-service

By jpuck

•Updated almost 7 years ago

Image
0

977

jpuck/opennlp-service repository overview

⁠OpenNLP Service

This java program provides RESTful API for Apache OpenNLP⁠ library.

⁠Notes:

⁠Quick Start

⁠1. Clone the repository:
$ git clone https://github.com/rbehzadan/opennlp-service.git
cd opennlp-service
⁠2. Download models (77MB):
$ mkdir models
$ cd models
$ wget -i ../models.url
$ cd ..
⁠3. Build:
$ mvn clean package
⁠4. Run:
$ java -jar target/opennlp-service-1.0.jar
⁠5. Use:
$ curl http://localhost -d "Grammar is useless because there is nothing to say."
⁠Changing binding address

You can change listening address and port by these two environment variables:

  • OPENNLP_SERVICE_HOST
  • OPENNLP_SERVICE_PORT

 

⁠Output example

You can find some samples here⁠.

⁠Docker

⁠Build:
$ cd opennlp-service
$ docker build -t opennlp .
⁠Run:
$ docker run --name opennlp --rm -p 80:80 -d opennlp

To specify the listening port:

$ docker run -e OPENNLP_SERVICE_PORT=1234 -p 1234:1234 -d opennlp

If you're using Docker for Mac, you may have to specify a memory limit.

$ docker run --memory 4G -p 80:80 -d opennlp

⁠Licenses

  • The project (itself), is licensed under the MIT License
  • Jersey⁠ and Grizzly⁠ are licensed under CDDL version 1.0 and GPL v2 license
  • Apache OpenNLP⁠ library is licensed under Apache 2.0 license

Tag summary

Content type

Image

Digest

Size

300.4 MB

Last updated

almost 7 years ago

docker pull jpuck/opennlp-service