List All English Stop Words in NLTK – NLTK Tutorial

By | July 3, 2019

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.

Preliminaries

# Load library
from nltk.corpus import stopwords
import nltk
nltk.download('stopwords')

nltk download english stop words

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

print en_stop_words

english stop words in nltk

 

Leave a Reply