You are on page 1of 1

Gaaffii 1ffaa

text = """ Tesla, Inc. is an American automotive and energy company based in PAlo Alto, California. """

data = text.split()

for i in data:

print (i)

Gaaffii 2ffaa

from gensim.parsing.preprocessing import remove_stopwords

text = "Nick likes to play football, however he is not too fond of tennis."

filtered_sentence = remove_stopwords(text)

print(filtered_sentence)

Gaaffii3ffaa

from nltk.stem import PorterStemmer

from nltk.tokenize import word_tokenize

ps = PorterStemmer()

words = ["program", "programs", "programmer", "programming", "programmers"]

for w in words:

print(w, " : ", ps.stem(w))

You might also like