Via this tutorial } 10-13-19
paragraph = "So, keep working. Keep striving. Never give up. Fall down seven times, get up eight. Ease is a greater threat to progress than hardship. Ease is a greater threat to progress than hardship. So, keep moving, keep growing, keep learning. See you at work."
paragraph
sentences = paragraph.split('.')
sentences
# remove stopwords
clean_sentences = [sentence.strip().split() for sentence in sentences]
clean_sentences
clean_words = [word.lower() for sent in clean_sentences for word in sent]
# clean_words = [word.lower() for word in sent for sent in clean_sentences]
clean_words
for sentence in sentences:
sentence = sentence.strip().split()
for word in sentence:
new_word = ''
for letter in word:
if letter.isalpha():
# print(letter)
new_word += letter.lower()
print(new_word)
# if word.isalpha():
# print(word.lower())
for sentence in clean_sentences:
# no_punctuation = [''.join(letters) for word in sentence for letters in word if letters.isalpha()]
no_punctuation = [letters for word in sentence for letters in word if letters.isalpha()]
print(no_punctuation)
clean_words = [word.lower() for word in sentence]
print(clean_words)