TensorFlow implementation of the paper,
dataset: SemEval2010 task8
word embeddings: senna
to run the code:
./run
to train model
./run
where num_epochs=200 --word_dim=50
have been set in 'run' file.
to test model
excute
python src/train.py --num_epochs=200 --word_dim=50 --test
then you can get a 'results.txt' file in /data/resuts.txt
to calculate F1 score
perl src/scorer.pl data/test_keys.txt data/results.txt
when you use Spyder or PyCharm to run this code, you may encounter this error:
ArgumentError: argument --train_file: conflicting option string: --train_file
solution:
restart spyder
or add annotation for all definitions of tf.flags.FLAGS
.
such as # flags.DEFINE_string("train_file", "data/train.cln", "original training file")