keyword-extraction icon indicating copy to clipboard operation
keyword-extraction copied to clipboard

File Not Found Error

Open heera0410 opened this issue 5 years ago • 1 comments

Hi,I am new to deep learning and got this error while executing the code .Could anyone suggest some ways to get rid of this. FileNotFoundError Traceback (most recent call last)

in () ----> 1 input_lang, output_lang, pairs = prepare_data('keyword', 'data', False) 2 3 class EncoderRNN(nn.Module): 4 5 def init(self, input_size, hidden_size):

in prepare_data(lang1, lang2, reverse) 11 12 def prepare_data(lang1, lang2, reverse=False): ---> 13 input_lang, output_lang, pairs = read_langs(lang1, lang2, reverse) 14 pairs = filter_pairs(pairs) 15

in read_langs(lang1, lang2, reverse) 13 14 def read_langs(lang1, lang2, reverse=False): ---> 15 lines = open('%s-%s.txt' % (lang1, lang2), encoding='utf-8').read().strip().split('\n') 16 pairs = [[normalize_string(s) for s in l.split('\t')] for l in lines] 17

FileNotFoundError: [Errno 2] No such file or directory: 'keyword-data.txt'

heera0410 avatar Apr 20 '19 10:04 heera0410

Ok this comment is pretty old but anyways: Have you checked that the keyword-data.txt is present in our project directory? If not you should check it out. It is part of the project.

See this for reference: https://github.com/TheApeMachine/keyword-extraction/blob/master/keyword-data.txt

AlexanderHagenhoff avatar Sep 16 '20 21:09 AlexanderHagenhoff