An implementation of the following paper in application of sentiment classification
Harnessing Deep Neural Networks with Logic Rules
Zhiting Hu, Xuezhe Ma, Zhengzhong Liu, Eduard Hovy, Eric P. Xing, ACL 2016
-
The code is adapted from previous work, written in Python (2.7) and Theano (0.9)
-
The SST2 dataset is used
-
contact: zhitinghu@gmail.com
Data Preparation
-
Download and uncompress the pre-trained word2vec to
data/w2v/
-
run script
data/preprocess_data.sh
underdata/
Running
-
run
run.sh
-
Average performance (accuracy) is around
q:0.893, p:0.887
(randomness comes from GPU parallelization)
Updates
Dependency updated:
Python = 2.7
Theano = 1.0.4 Uses PyGpu: set device=gpu -> device=cuda downsample routine changed conv2d routine changed
NumPy = 1.15 (1.16 causes problem)