# Env python 3.5 nltk pip3 install python-zpar # dataset twitter: https://languagenet.github.io/ # test bert CUDA_VISIBLE_DEVICES=1 python3 bertinterface.py # sampling # hm python3 source/run.py --no_train --exps_dir test --exp_name test --gpu 1 --mode mh --forward_path exps/forward/ckpt/model-best.pkl --backward_path exps/backward/ckpt/model-best.pkl --hidden_size 512 --sample_time 100 --search_size 100 --data_path data/quora/test.txt --sim_mode keyword --save_path log.log --use_data_path data/input/input.txt --reference_path data/input/refer.txt # basic sa python3 source/run.py --data_path data/input/input.txt --use_data_path data/input/test.txt --mode kw-bleu --save_path temp.txt --N_repeat 1 --save_path temp.txt --batch_size 1 --gpu 2 # basic sa batch python3 source/run.py --data_path data/input/input.txt --use_data_path data/input/test.txt --mode kw --save_path temp.txt --N_repeat 1 --save_path temp.txt --batch_size 3 --gpu 2 #coco python source/run.py --data_path data/input/input.txt --use_data_path data/coco-model/cocovalid.txt --exps_dir exps-sampling/ --exp_name test1 --gpu 1 --forward_save_path data/coco-model/forward.ckpt --backward_save_path data/coco-model/backward.ckpt --dict_path data/coco-model/dict.pkl --emb_path data/coco-model/emb.pkl # quora python source/run.py --data_path data/input/input.txt --use_data_path data/quoradata/test.txt --mode kw-bleu --N_repeat 1 --exps_dir exps-sampling/ --exp_name quora-kw7 --batch_size 1 --gpu 1 --M_kw 7 --search_size 50 --C 0.03 # twitter python source/run.py --data_path data/input/input.txt --use_data_path data/twitterdata/twitter-test.txt --exps_dir exps-sampling/ --exp_name twitter-kw --gpu 1 --forward_save_path data/twitter-model/forward.ckpt --backward_save_path data/twitter-model/model/backward.ckpt --dict_path data/twitter-model/dict.pkl --emb_path data/twitter-model/emb.pkl # evaluate ## links ### https://github.com/Maluuba/nlg-eval #https://github.com/Diego999/py-rouge python source/postprocess.py data/quoradata/test.txt results/quora.txt data/quoradata/refer.txt post/ data/quora/dict.pkl python source/evaluate.py --reference_path post/ref.txt --generated_path post/gen.txt --mode rouge nlg-eval --hypothesis=tem.txt --references=sa-coco-searchsize50-8479-.txt