lukecq1231 / kim

Knowledge-based Inference Model
Apache License 2.0
55 stars 13 forks source link

question: #4

Open zohreh3906 opened 5 years ago

zohreh3906 commented 5 years ago

hello. I have python 2.7.15 and theano 1.0.3 . By running the command "bash fetch_and_preprocess.sh" I encountered the following error. what is the reason?

Found SNLI dataset - skip Found Glove vectors - skip Found WordNet 3.0 - skip Found Stanford CoreNLP - skip

Preprocessing WordNet prolog and SNLI dataset

  1. build dictionary of WordNet

Processing /home/aryan/Documents/kim-master/data/wordnet/prolog/wn_s.pl number of phrases 0 size of word dictionary 84487 size of synset_id dictionary 92784 size of synset_id_num dictionary 138896

  1. obtain relation features

hypernymy: 753086 hyponymy: 753086 co_hyponyms 3674700 antonymy: 6617 synonymy: 237937 relation features dim: 5

  1. save to readable format (txt)

number of total relation features: 5368548

  1. obtain train/dev/test dataset

snli_1.0_dev.txt max min len premise 59 2 max min len hypothesis 55 2 snli_1.0_test.txt max min len premise 57 2 max min len hypothesis 30 1 snli_1.0_train.txt max min len premise 82 2 max min len hypothesis 62 1

  1. obtain lemma format for train/dev/test dataset

Run ... java -cp ".:./corenlp/stanford-corenlp-full-2016-10-31/" tokenize_and_lemmatize /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_train.txt /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_train_token.txt /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_train_lemma.txt sh: 1: java: not found Run ... java -cp ".:./corenlp/stanford-corenlp-full-2016-10-31/" tokenize_and_lemmatize /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_train.txt /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_train_token.txt /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_train_lemma.txt sh: 1: java: not found Run ... java -cp ".:./corenlp/stanford-corenlp-full-2016-10-31/" tokenize_and_lemmatize /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_dev.txt /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_dev_token.txt /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_dev_lemma.txt sh: 1: java: not found Run ... java -cp ".:./corenlp/stanford-corenlp-full-2016-10-31/" tokenize_and_lemmatize /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_dev.txt /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_dev_token.txt /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_dev_lemma.txt sh: 1: java: not found Run ... java -cp ".:./corenlp/stanford-corenlp-full-2016-10-31/" tokenize_and_lemmatize /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_test.txt /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_test_token.txt /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_test_lemma.txt sh: 1: java: not found Run ... java -cp ".:./corenlp/stanford-corenlp-full-2016-10-31/" tokenize_and_lemmatize /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_test.txt /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_test_token.txt /home/aryan/Documents/kim-master/data/sequence_and_features/hypothesis_snli_1.0_test_lemma.txt sh: 1: java: not found

  1. build dictionary for word sequence and lemma sequence from training set

Processing /home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_train_token.txt Traceback (most recent call last): File "preprocess_data.py", line 363, in os.path.join(dst_dir, 'vocab_cased.pkl'), wordnet=word_id_num, remove_phrase=True) File "preprocess_data.py", line 211, in build_dictionary with open(filepath, 'r') as f: IOError: [Errno 2] No such file or directory: '/home/aryan/Documents/kim-master/data/sequence_and_features/premise_snli_1.0_train_token.txt'

lukecq1231 commented 5 years ago

I think you need java environment. BTW, you should use theano 0.9 to run my code, or you will get some error by using theano 1.0.