I have a word dictionary stored in word_dict and I am trying to convert text to sequences manually using the function described below. But it is keep on throwing No Value Error. I have also checked the function by applying only one record of the dataset but it is not applying to the whole record.
def tex_to_sequences():
word_seq=[]
doc = nlp(text)
print(len(doc))
print(word_seq)
for t in doc:
word_seq.append(word_dict.get(t.text))
print(len(word_seq))
return word_seq
df['sequences']= df['text'].apply(tex_to_sequences)