l294265421 / ASOTE

Aspect-Sentiment-Opinion Triplet Extraction (ASOTE)
https://arxiv.org/pdf/2103.15255.pdf
73 stars 11 forks source link

repeat_non_bert.sh: 25: Syntax error: "(" unexpected #4

Open Jurys22 opened 2 years ago

Jurys22 commented 2 years ago
(ASOTE) me@me:~/ASOTE/ASOTE$ sh repeat_non_bert.sh 0 101-ASOTEDataRest14-0,101-ASOTEDataRest14-1,101-ASOTEDataRest14-2,101-ASOTEDataRest14-3,101-ASOTEDataRest14-4 nlp_tasks/absa/mining_opinions/sequence_labeling/towe_bootstrap.py --embedding_filepath /home/me/ASOTE/ASOTE/glove.840B.300d.txt --bert_file_path /home/me/ASOTE/ASOTE/bert-base-uncased.tar.gz --bert_vocab_file_path /home/me/ASOTE/ASOTE/bert-base-uncased-vocab.txt --current_dataset ASOTEDataRest14 --data_type common_bert_with_second_sentence_101 --model_name TermBertWithSecondSentence --train False --evaluate False --predict False --crf False --same_special_token False --fixed_bert False --position_and_second_sentence True --add_predicted_aspect_term True --ate_result_filepath_template model_data/absa/ate/ASOTEDataRest14/common_bert/model_name_NerBert-include_conflict_False.4-ASOTEDataRest14-%d/1571400646/models/result_of_predicting_test.txt
start 20220329161135--------------------------------------------------
repeat_non_bert.sh: 25: Syntax error: "(" unexpected

Hello! I am running into this error.

I am following step by step the readme, I installed the python version required and the other packages. I downloaded the glove, bert uncased, vocab files. I started executing the bash command using the absolute path for the three files downloaded.

However I am not able to continue because it says that there is an error in the bash file.

Any hints? Is there anything more to do than following the read me step by step?

Thank you!

l294265421 commented 2 years ago
(ASOTE) me@me:~/ASOTE/ASOTE$ sh repeat_non_bert.sh 0 101-ASOTEDataRest14-0,101-ASOTEDataRest14-1,101-ASOTEDataRest14-2,101-ASOTEDataRest14-3,101-ASOTEDataRest14-4 nlp_tasks/absa/mining_opinions/sequence_labeling/towe_bootstrap.py --embedding_filepath /home/me/ASOTE/ASOTE/glove.840B.300d.txt --bert_file_path /home/me/ASOTE/ASOTE/bert-base-uncased.tar.gz --bert_vocab_file_path /home/me/ASOTE/ASOTE/bert-base-uncased-vocab.txt --current_dataset ASOTEDataRest14 --data_type common_bert_with_second_sentence_101 --model_name TermBertWithSecondSentence --train False --evaluate False --predict False --crf False --same_special_token False --fixed_bert False --position_and_second_sentence True --add_predicted_aspect_term True --ate_result_filepath_template model_data/absa/ate/ASOTEDataRest14/common_bert/model_name_NerBert-include_conflict_False.4-ASOTEDataRest14-%d/1571400646/models/result_of_predicting_test.txt
start 20220329161135--------------------------------------------------
repeat_non_bert.sh: 25: Syntax error: "(" unexpected

Hello! I am running into this error.

I am following step by step the readme, I installed the python version required and the other packages. I downloaded the glove, bert uncased, vocab files. I started executing the bash command using the absolute path for the three files downloaded.

However I am not able to continue because it says that there is an error in the bash file.

Any hints? Is there anything more to do than following the read me step by step?

Thank you!

I am sorry for this delayed response. I don't know why this error happens. A possible solution to this problem is to use the https://github.com/l294265421/ASOTE/blob/main/run.sh script as opposed to repeat_non_bert.sh. For example, the command sh repeat_non_bert.sh 7 4-ASOTEDataRest14-0,4-ASOTEDataRest14-1,4-ASOTEDataRest14-2,4-ASOTEDataRest14-3,4-ASOTEDataRest14-4 nlp_tasks/absa/mining_opinions/sequence_labeling/ate_bootstrap.py --embedding_filepath glove.840B.300d.txt --bert_file_path bert-base-uncased.tar.gz --bert_vocab_file_path uncased_L-12_H-768_A-12/vocab.txt --current_dataset ASOTEDataRest14 --data_type common_bert --model_name NerBert --train True --evaluate True --predict False --predict_test True --crf False --fixed_bert False > ate.4-ASOTEDataRest14-0.log 2>&1 & will become sh run.sh --gpu_id 0 --seed 776 --repeat 4-ASOTEDataRest14-0 nlp_tasks/absa/mining_opinions/sequence_labeling/ate_bootstrap.py --embedding_filepath glove.840B.300d.txt --bert_file_path bert-base-uncased.tar.gz --bert_vocab_file_path uncased_L-12_H-768_A-12/vocab.txt --current_dataset ASOTEDataRest14 --data_type common_bert --model_name NerBert --train True --evaluate True --predict False --predict_test True --crf False --fixed_bert False > ate.4-ASOTEDataRest14-0.log 2>&1 & Note that the latter only runs the model one time.

KongKong390 commented 1 year ago

Just replace sh with bash

KongKong390 commented 1 year ago

image