# The Stemmers presented by nltk
from nltk.stem.porter import PorterStemmer

# The Lemmatization presented by nltk
from nltk.stem import WordNetLemmatizer


portStem = PorterStemmer()

# Initalize Lemmatizer
wordLemmatizer = WordNetLemmatizer()

# List of words to test on
Words = ["operate" ,"operating" ,"operates", "operation" ,"operative", "operatives" ,"operational"]
StemWords = []
LemmWords = []

# Stem and Lemmatise each word in the list
for word in Words:
    StemWords.append(portStem.stem(word))
    LemmWords.append(wordLemmatizer.lemmatize(word))
    
# Print the results of each entry
for entry in range(len(Words)):
    print("Original  Word: " + Words[entry])
    print("Stemmed   Word: " + StemWords[entry])
    print("Lemmatize Word: " + LemmWords[entry])
    print("\n")