Git Product home page Git Product logo

sentiment-analysis-engine's Introduction

Sentiment Analysis Engine

Provides positive, negative, or neutral classification for a sample of English language text.

Current version is based off of Natural, the node-based NLP library.

Versions

There are two current versions of this application. One deployed through Vercel which can be found here

The other version can be found in the directory titled node-nlp-api which can be run locally as an API on your local machine. Most tools associated with this project are written in Nodejs or bash.

Install of node-nlp-api

git clone https://gitlab.com/zoverlvx/sentiment-analysis-engine.git

cd sentiment-analysis-engine/node-nlp-api && npm i

Run

npm start 

API

To request sentiment analysis from the API
Send POST to localhost:PORT/api/nlp
PORT defaults to 3000 if PORT is not in environment

Request

{
    data: String|String[] 
}

Response

{
    sentiment: Sentiment|Sentiment[]
}

Example Request:

curl -X POST \
-H "Content-Type: application/json" \
-d '{"data": ["good", "bad", "beautiful"]}'\
localhost:3000/api/nlp

This API is currently equipped with stress tests. The script test will use text examples from lockdown.txt in order to test the response rate of the API.

12 Factors

Factor Implementation Strategy
Codebase Gitlab
Dependencies npm & custom shell scripting & env for dependency isolation
Config Store keys in .env file
Backing services Twitter API & Google Translate API, no file-based io. Investigating reload module at runtime
Build, release, run Use npm build system and GitLab CI/CD
Processes Shell script kicks off 2 processes: static server and API endpoint
Port binding All ports are defined in .env and added at build time
Concurreny Define a shell script to start and stop processes via GitLab CI/CD
Disposability Handle SIGTERM and possibly handle events with a task queue.
Dev/prod parity No database, 2 branches: dev and master, daily merges, smaill team, dev tools all Unix
Logs All output to stdout, aggregated by process management script
Admin processes Support a REPL, support remote shell commands, separate admin dir

References

sentiment-analysis-engine's People

Contributors

dionys93 avatar mricos avatar

Watchers

 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.