Skip to content

bill-kalog/cnn-sent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convolutional Neural Networks for Sentiment Analysis

a tensorflow implementation of the paper Convolutional Neural Networks for Sentence Classification

The code is highly based on :

This model is slighlty different from the previous ones. There is possibility to use several pretrained vectors, load a few different datasets and choose between using the same filter during convolutions for all word embedding channels or a seperate one. Finally, provides cross validation splits for the datasets used (although, cross validation is not explicitely implemented). At the moment when assesing on a dev/test set all words that didn't exist in training set are considered unknown, even when using pretrained vectors...

Requirements

  • Python 3
  • Tensorflow 1.0
  • numpy

Running instructions

  • change arguments in conf.py according to needs
  • replace/change code in main.py according to preference
  • run code using $ python main.py

Configuration file

Here are several hyperparameters that need to be fixed prior to running or else the program is going to crash. Currently there is no possibility to download automatically the supported datasets or/and word vectors. So, one must download and point to them

Tensorboard

There is a possibility to check variables/embeddings in tesorboard too (although not so well implemented) just run

$ tensorboard --logdir ./runs/

if your current directory is the code folder.

Supported datasets

Supported word embeddings

Releases

No releases published

Packages

No packages published

Languages