Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 1.21 KB

File metadata and controls

26 lines (22 loc) · 1.21 KB

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