Sentic-GCN icon indicating copy to clipboard operation
Sentic-GCN copied to clipboard

infer issue

Open sherifyounis opened this issue 2 years ago • 2 comments

loading word vectors ... Traceback (most recent call last): File "D:\sherif\B thesis\sarcasm paper\import papers\Sentic-GCN-main\ABSA-Detection\infer.py", line 124, in inf = Inferer(opt) File "D:\sherif\B thesis\sarcasm paper\import papers\Sentic-GCN-main\ABSA-Detection\infer.py", line 55, in init
embedding_matrix = build_embedding_matrix(self.tokenizer.word2idx, opt.embed_dim, opt.dataset) File "D:\sherif\B thesis\sarcasm paper\import papers\Sentic-GCN-main\ABSA-Detection\data_utils.py", line 30, in build_embedding_matrix word_vec = load_word_vec(fname, word2idx=word2idx) File "D:\sherif\B thesis\sarcasm paper\import papers\Sentic-GCN-main\ABSA-Detection\data_utils.py", line 8, in load_word_vec fin = open(path, 'r', encoding='utf-8', newline='\n', errors='ignore') FileNotFoundError: [Errno 2] No such file or directory: '../glove.42B.300d.txt'

sherifyounis avatar Sep 01 '23 09:09 sherifyounis

下载glove.42B.300d,放到项目文件中

fengersenboy avatar Sep 21 '23 17:09 fengersenboy

loading word vectors ... Traceback (most recent call last): File "D:\sherif\B thesis\sarcasm paper\import papers\Sentic-GCN-main\ABSA-Detection\infer.py", line 124, in inf = Inferer(opt) File "D:\sherif\B thesis\sarcasm paper\import papers\Sentic-GCN-main\ABSA-Detection\infer.py", line 55, in init embedding_matrix = build_embedding_matrix(self.tokenizer.word2idx, opt.embed_dim, opt.dataset) File "D:\sherif\B thesis\sarcasm paper\import papers\Sentic-GCN-main\ABSA-Detection\data_utils.py", line 30, in build_embedding_matrix word_vec = load_word_vec(fname, word2idx=word2idx) File "D:\sherif\B thesis\sarcasm paper\import papers\Sentic-GCN-main\ABSA-Detection\data_utils.py", line 8, in load_word_vec fin = open(path, 'r', encoding='utf-8', newline='\n', errors='ignore') FileNotFoundError: [Errno 2] No such file or directory: '../glove.42B.300d.txt'

Pls download glove.42B.300d.txt and put it in the directory of the project. Thank you!

BinLiang-NLP avatar Sep 22 '23 03:09 BinLiang-NLP