Skip to content

jaimeguzman/template-scala-rnn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template description.

This template provides sentiment analysis algorithm RNN.

Installation.

Follow installation guide for PredictionIO.

After installation start all PredictionIO vendors and check pio status:

pio-start-all
pio status

Copy this template to your local directory with:

pio template get ts335793/template-scala-spark-dl4j-word2vec-rnn <TemplateName>

Download en-parser-chunking.bin and place it in <TemplateDirectory>/src/main/resources/.

Importing training data.

You can import example training data from kaggle. It is collection of the Rotten Tomatoes movie reviews with sentiment labels.

In order to use this data, create new app:

pio app new <ApplicationName> # prints out ApplicationAccessKey

set appName in engine.json to ApplicationName and import data with:

python data/import_eventserver.py --access_key <ApplicationAccessKey> --file train.tsv

You can always remind your application id and key with:

pio app list

Build, train, deploy.

You might build template, train it and deploy by typing:

pio build
pio train
pio deploy

Sending requests to server.

In order to send a query run in template directory:

python data/send_query_interactive.py

and type phrase you want sentiment to be predicted. The result will be predicted sentiment for the phrase.

About

RNN algorithm implementation.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 92.6%
  • Python 7.4%