I use this spacy code to later apply it on my text, but i need the negative words to stay in the text like "not".
nlp = spacy.load("en_core_web_sm")
def my_tokenizer(sentence):
return [token.lemma_ for token in tqdm(nlp(sentence.lower()), leave = False) if token.is_stop == False and token.is_alpha == True and token.lemma_ ]
Whit this when i apply i get this as a result :
[hello, earphone, work]
However the original sentence was
hello,my earphones are still not working.
So, i would like to see the following sentence: [earphone, still, not, work]
Thank you