Git Product home page Git Product logo

deenaariff / starly Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 1.0 280 KB

Application that predicts the number of stars that of a Yelp Review in realtime as a reviewer types it. Runs as a microservice-based application using Node.js, Python, and Docker. Displays results from Google Natural Language API and a custom trained classification models.

Jupyter Notebook 44.87% HTML 53.81% JavaScript 0.32% Python 0.96% Shell 0.04%
yelp-reviews yelp-dataset microservices scikit-learn naive-bayes-classifier logistic-regression nlp-machine-learning python node-js

starly's Introduction

Starly: Sentiment Analysis of Yelp Reviews

alt text

Our project of analyzing the sentimetn of Yelp Reviews was implemented using Python, various machine learning modules, and a Jupyter notebook.

We also worked on a supplementary project, which is a sentiment prediction dashboard. This was completed using Docker, Node.js, and Python/Flask.

Install Dependencies

To install all pip module and nltk module dependencies, run the dependencies.sh file.

sh dependencies.sh

Dependency Versions Used in Our Implementation

pandas: 0.18.1 nltk: 3.2.4 numpy: 1.12.1 scipy: 0.17.0 scikit-learn: 0.17.1 jupyter: 1.0.0

Run the Jupyter Notebook

Navigate to the jupyter notebook folder from the root directory of the folder.

cd jupyter-notebook

Run the jupyter notebook application inside this directory.

jupyer-notebook

In the jupyter dashbaord open the file: Integrated Master File_v8.ipynb.

View Jupyter Notebook as HTML

To view a static filed version of our jupyter notebook and its outputs, open Integrated+Master+File_v8.html in your browser.

Yelp Review Predictive Dashboard

Because the predictive dashboard was supplementary, we decided to complete it using Node.js, Python, and Docker.

To run the application, you'll have to have docker and docker-compose installed. If you have a MAC, consider installing docker-machine in order to build the images and run the containers.

To view the instructions on how to run the application, read below.

Sentiment Prediction Dashboard

Running the application locally

The Sentiment Prediction Dashboard Application is built using two services, the api-gateway and prediction-server, which are built using Node.js and Python/Fask respectively. To make this application easier to run locally, both services have been dockerized. To run these applications, you can build each container seperately, or run them using docker-compose. A docker-compose.yml file has been provided in the root folder.

The Node.js application interfaces with the Google Natural Language API. To run the application, you must first setup an account on Google Cloud Platform and setup a project that enables the Google Natural Language API.

Ensure that the environment variabel GCP_PROJECT is set to your project's id before running the application.

export GCP_PROJECT=[your project's id]

Building Images and Running Containers Using Docker-Compose

To run the application using docker-compose ensure that docker and docker-compose are both installed locally. To run these docker-containers on a MAC, you can install docker-machine.

To start up the containers, navigate to the root directory and run:

docker-compose up

This will build the images of the api-gateway and prediction-server if they are not present, and will run them once they are built.

Navigate to http://localhost:3000/, to access the api-gateway. Note: If using docker-machine, you'll have to access PORT 3000 on the the url that docker-machine is exposed on. You can find out this url by running:

docker-machine ip

At this url, you can access the api-gateway which will serve the static files of the dashboard on port 3000. You can now use the application.

Continued Augmentations and Implementations

Implement Service Discovery Using Netflix Eureka and HashiCorp Consul.

starly's People

Contributors

deenaariff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.