Professional Documents
Culture Documents
Project 5 Stemming
Project 5 Stemming
Type 1
from nltk.stem import PorterStemmer
ps = PorterStemmer()
# choose some words to be stemmed
words = ["program", "programs", "programmer", "programming", "programmers"]
for w in words:
print(w, " : ", ps.stem(w))
Type 2
#The Lancaster stemmers are more aggressive and dynamic
compared to the other two stemmers.
Type 3
# Snowball Stemmer can improve the accuracy of text analysis
tasks such as sentiment analysis