Skip to content

spiashko-university/text-sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

text-sentiment-analysis

This analyzer is based on SVM. Implementation of SVM is taken from Tensorflow: CookBook

Prerequisites

  1. download dataset
  2. copy unpacked dataset to root folder of this repo
  3. use preparator.py script to transform dataset to more usable view

Train

For training use script main.py, parameters which you can try to variate:

  • number_epoch
  • learning_rate
  • alpha_val
  • batch_size

Test

For check accuracy of training use test.py script. It will print accuracies for test part of the dataset.

Portability

use freeze.py script to freeze your model to use it in your purpose in another projects. This script will produce file model.pb in trained_model folder.

  • Input tensor: "x:0"
  • Output tensor: "y_pred:0"
    You can check how to import this frozen model in java by example in this repository

Try your example

If you want to check model by your example use scripts:

  • predict_from_frozen_model.py
  • predict_from_std_model.py
    text which you want recognise put in text variable for both of this scripts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages