Skip to content

A Chainer implementation of a Convolutional Network model for sentence classification in movie reviews dataset.

Notifications You must be signed in to change notification settings

shashwath94/Sentence-Classification-with-CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentence-Classification-with-CNN

A Chainer implementation of a Convolutional Network model for sentence classification in movie reviews dataset.

The CNN model is inspired by Convolutional Neural Networks for Sentence Classification

Requirements

  1. Python3
  2. Chainer
  3. vsmlib
  4. numpy
  5. Word Embeddings (It can be downloaded from https://nlp.stanford.edu/projects/glove/, the Stanford NLP group has a bunch of open source pre-trained Glove embeddings or you can use your own embeddings. Just specify the path in config.yaml)

Dataset The Movie Reviews (MR) dataset (https://www.cs.cornell.edu/people/pabo/movie-review-data/) is used for this model. The Train, dev and test sets have to be present. The path can be specified in cofig.yaml file. A small subset of the data is provided to get you started.

1 That was so beautiful that it can't be put into words . (POSITIVE SETENCE)
0 I do not want to go to school because I do like to study math . (NEGATIVE SENTENCE)

Configuration parameters All the config parameters and the hyperparameters of the model can be specified in the config.yaml file.

Train the model

python3 train_cnn.py config.yaml

About

A Chainer implementation of a Convolutional Network model for sentence classification in movie reviews dataset.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages