Giter Site home page Giter Site logo

nlp's Introduction

Natural language processing services

This is a list of several ready to use NLP services, wich i used in practice and built as distinct docker containers, preferrly required Nvidia GPU adapter.

Installation

git clone https://github.com/format37/nlp.git
cd nlp
mv docker-compose.yml.default docker-compose.yml

Open and edit docker-compose.yml
To enable the selected service, set according service replicas parameter:

replicas: 1  

Define, wich nvidia gpu adapter used for service, starting from 0:

device_ids: ['0']

Define the model, corresponding to language you need, if available in docker-compose.yml config.
To build server, run:

sudo docker-compose up --build -d

And test the service, with one of examples below

Deeppavlov paraphrase

Docker service, receives two lists of phrases.
Returns a list[n] of int values: 0 or 1, wich defines, is list_a[n] and list_b[n] are paraphrase or not.
Example: paraphrase.ipynb

Deeppavlov sentiment

Docker service, receives one list of phrases.
Returns a list[n] of sentiment categories ['positive', 'neutral', 'negative', 'speech'], for each list[n] phrase.
Example: sentiment.ipynb

Deeppavlov textqa

Docker service, receives two lists:

  • texts
  • questions

Returns two lists:

  • questions
  • answers

Example: textqa.ipynb

Summarus

Docker service, receives one string of Russian text.
Returns one summarized string of text.
Example: summarus.ipynb

Parse unstructured data

Direct openai api request, using text-davinci-002 model, to parse unstructured data.
For example, having a prompt:

Alex: How much you paid for pizza?
Jane: I paid $7 for my piece of pizza
Max: I am not eating that pizza
Alex: Ok, then my piece was $12

Unparsed answer looks like:

|------|-------|
| Alex | $12   |
| Jane | $7    |
| Max  | $0    |

Example: parser.ipynb

nlp's People

Contributors

format37 avatar

Watchers

 avatar  avatar

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.