Giter VIP home page Giter VIP logo

nlp-word-tagger-server's Introduction

NLP Word Tagger Server

Mini Python Server that receives a sentence and tokenizes & tags included words.

Supported languages: German and English.

Configuration

The following settings can be adjusted by environment variables:

  • BASIC_AUTH_ENABLED: defaults to true
  • BASIC_AUTH_USER_NAME: defaults to admin
  • BASIC_AUTH_USER_PASSWORD: defaults to admin
  • SERVER_PORT: defaults to 8080
  • SERVER_HOST: defaults to 0.0.0.0

Docker Setup

docker build . -t nlp-word-tagger-server
docker run --env BASIC_AUTH_ENABLED=true --env BASIC_AUTH_USER_NAME=admin --env BASIC_AUTH_USER_PASSWORD=test --env SERVER_PORT=8080 --env SERVER_HOST=0.0.0.0 -p 8080:8080 nlp-word-tagger-server 

Docker Compose

version: "3.8"

services:
  nlp-word-tagger-server:
    build:
      context: https://github.com/b310-digital/nlp-word-tagger-server.git#main
      target: production
    restart: on-failure
    tty: true
    stdin_open: true
    ports:
      - 8080:8080
    environment:
      BASIC_AUTH_ENABLED: true
      BASIC_AUTH_USER_NAME: admin
      BASIC_AUTH_USER_PASSWORD: test
      SERVER_PORT: 8080
      SERVER_HOST: 0.0.0.0

Manual Setup

Install

pip3 install -r requirements.txt

Start

python3 server.py

Usage

Simply POST to the server on path /tagged_words?lang=en where lang = {en | de} a body with text. Don't forget to provide BASIC AUTH information according to your setup.

Example response for a german query:

[
	{
		"original": "hat",
		"normalized": "haben",
		"wordClass": "VA(FIN)"
	},
	{
		"original": "viele",
		"normalized": "viel",
		"wordClass": "PIAT"
	},
	{
		"original": "Ursprünge",
		"normalized": "Ursprung",
		"wordClass": "NN"
	}
]

Acknowledgements

nlp-word-tagger-server's People

Contributors

jannikstreek avatar nwittstruck avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nlp-word-tagger-server's Issues

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.