Stop word are commonly used words (such as “the”, “a”, “an” etc) in text, they are often meaningless. However, we can not remove them in some deep learning models.
In this tutorial, we will write an example to list all english stop words in nltk.
# Load library from nltk.corpus import stopwords import nltk nltk.download('stopwords')
Get all english stop words
en_stop_words = stopwords.words('english')
Show english stop words amount
num = len(en_stop_words)
The result is: 179
Show all english stop words