Coder Social home page Coder Social logo

aromoh / keras-distributed-streaming Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 1.0 772 KB

Distributed Keras model for making predictions of sentiment from Spanish sentences in stream context using Spark Streaming and Apache Kafka

Jupyter Notebook 64.43% Python 35.57%
keras keras-tensorflow cnn-keras spark-streaming kafka sentiment-analysis spark pyspark-notebook

keras-distributed-streaming's Introduction

Keras-Distributed-Streaming

Distributed Keras model for making predictions of sentiment from Spanish sentences in stream context using Spark Streaming and Apache Kafka. The project has a script that allows you to enter phrases by command line and send them to a Kafka topic. Then Kafka sends the information to Spark Streaming where through the Jupyter Notebook shows the polarity of sentences on the screen.

Prerequisites

Files:

Software versions:

  • Spark 2.0.2 pre-build for Hadoop 2.7 or later
  • Apache Kafka 2.11-0.10.2.0 binary file for Scala 2.11
  • Python 3.5

Library versions:

  • TensorFlow 1.2.1
  • Keras 2.0.6
  • Nltk 3.2.2
  • Kafka-python

Execution

First you have to start a ZooKeeper server

bin/zookeeper-server-start.sh config/zookeeper.properties

Then you have to start a Kafka server

bin/kafka-server-start.sh config/server.properties

Next step is create a topic in Kafka named "test"

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

Later, you have to open Jupyter-notebook writing the next line

$SPARK_HOME/bin/pyspark --master local[*] --packages org.apache.spark:spark-streaming-kafka-0-8_2.11:2.0.2

Finally you only have to follow the instruction of the notebook.

keras-distributed-streaming's People

Contributors

aromoh avatar

Stargazers

 avatar  avatar  avatar

Forkers

hussienao

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.