Giter Site home page Giter Site logo

jpuck / opennlp-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rbehzadan/opennlp-service

0.0 0.0 0.0 14 KB

RESTful API for Apache OpenNLP Library

Home Page: https://hub.docker.com/r/jpuck/opennlp-service

License: MIT License

Dockerfile 1.64% Java 98.36%

opennlp-service's Introduction

OpenNLP Service

This java program provides RESTful API for Apache OpenNLP library.

Notes:

  • It is based on Jersey and Grizzly frameworks.

  • Default binding address is: 0.0.0.0:80

  • The web service consumes POST requests with raw data (text/plain) payload.

  • At the moment, it only supports English language (through official pre-trained models for the OpenNLP 1.5).

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.