from nltk.stem import LancasterStemmer stemmer = LancasterStemmer() word1 = "running" word2 = "fishing" word3 = "troubled" word4 = "lovely" word5 = "happening" print(stemmer.stem(word1)) print(stemmer.stem(word2)) print(stemmer.stem(word3)) print(stemmer.stem(word4)) print(stemmer.stem(word5))In this example, we create an instance of the LancasterStemmer class and then use the `stem` method to extract the root of each word. The output shows the stemmed words: "run", "fish", "troubl", "lov", and "hap". The NLTK package library includes various natural language processing tools, including tokenization, stemming, tagging, parsing, and more. The LancasterStemmer is part of the stemming tools provided by the NLTK library.