Giter Site home page Giter Site logo

tokenizer's Introduction

MIT License

Tokenizer

Simple REST (ha-ha) service for tokenization.

Link to specification

Getting started

  1. follow instructions in senteser app README file
  2. Run sentenser docker run -p 8082:8082 sentenser-0.0.1
  3. Run docker-compose up -d
  4. Send request, example:
curl --request POST \
  --url http://0.0.0.0:5000/api/tokenize \
  --header 'Content-Type: application/json' \
  --data '{
	"text": "Good muffins cost $3.88 in New York.  Please buy me ntwo of them. Thanks"
}'

Possible improvements

tokenizer

  • Reorganize config.py
  • Add dependency injection for a services
  • Create tokenizer models instead of json handling by hand
  • move to swagger and swaggerUI for better handling data models for main REST api
  • implement logging

senteser

  • coreNLP library can be used as standalone jar and can be executed from command line or service, wrapping around spring boot may not be the best solution in terms of saving memory and resources (memory consuming is around 2Gb idle)
  • tomcat server under sping boot may be tuned server.tomcat.max-threads. Asynchronous processing can be used also
  • coreNLP can be used as python package
  • implement logging

Overall

  • move infrastructure to etcd and kubernetes, to use service discovery and improve services extensibility
  • Use protobuff and gRPC for communicating between services instead of REST and json approach may save some resources
  • use additional dictionaries and rules for coreNLP
  • handle different languages
  • use more lightweight docker images

Implementation difficulties

  • Confusions during implementing custom coreNLP english.all.3class.distsim.crf.ser.gz classifier. Didn't handle stacktrace errors.

License

MIT

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.