Git Product home page Git Product logo

digator-opennlp's Introduction

digator-opennlp

digator-opennlp ("dig" + "gator" + "opennlp") is an API service for different OpenNLP tasks.

Features:

  • Named Entity extraction (OpenNLP and Label Studio output formats).
  • Sentence detector.

Quick start:

# Start daemon.
user@localhost ~ $ docker run --rm -p 8080:8080 -ti ghcr.io/livelace/digator-opennlp:master-1.9.3
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2021-01-27 19:43:04,071 INFO  [io.quarkus] (main) digator-opennlp 1.0-SNAPSHOT on JVM (powered by Quarkus 1.10.5.Final) started in 1.313s. Listening on: http://0.0.0.0:8080
2021-01-27 19:43:04,122 INFO  [io.quarkus] (main) Profile prod activated. 
2021-01-27 19:43:04,122 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy, resteasy-jsonb, smallrye-health, smallrye-openapi, swagger-ui]

# Named entity extraction (OpenNLP format).

curl -X POST "http://127.0.0.1:8080/ner/news/ru/all" \
  -H  "accept: application/json" \
  -H  "Content-Type: application/json" \
  -d "{\"text\":\"Руководитель московского департамента торговли и услуг Алексей Немерюк в среду, 27 января, отметил, что, несмотря на снятие ограничений на работу развлекательных заведений города в ночное время перчаточно-масочный режим в них никто не отменял.\"}"
        
# Named entity extraction (Label Studio format).

curl -X POST "http://127.0.0.1:8080/ner/news/ru/all?format=label-studio" \
  -H  "accept: application/json" \
  -H  "Content-Type: application/json" \
  -d "{\"text\":\"Руководитель московского департамента торговли и услуг Алексей Немерюк в среду, 27 января, отметил, что, несмотря на снятие ограничений на работу развлекательных заведений города в ночное время перчаточно-масочный режим в них никто не отменял.\"}" | jq  

# Sentence segmentation.

curl -X POST "http://127.0.0.1:8080/sentence/news/ru" \
  -H  "accept: application/json" \
  -H  "Content-Type: application/json" \
  -d "{\"text\":\"Как уточняет ИА SakhaNews, инцидент произошел в ноябре 2020 года. Мальчик шел с мамой в детский сад, когда наступил на крышку канализационного колодца.\"}"

Swagger UI:

Navigate to http://127.0.0.1:8080 for Swagger UI experience.

swagger

Credits:


main

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.