Page 1 of 1

deleted all the words in any txt using python pandas. fix this code # To clean words filename = 'engl_stopwords.txt' fil

Posted: Sun May 15, 2022 11:56 am
by answerhappygod
deleted all the words in any txt using python pandas. fix this
code
# To clean words
filename = 'engl_stopwords.txt'
file = open(filename, 'rt')
text = file.read()
file.close()
# split into words
from nltk.tokenize import word_tokenize
tokens = word_tokenize(text)
#number of words
print(tokens[:5000000000000])