Home Artificial Intelligence Stopwords🤚🛑✋



Stop image

You might be wondering what are these stopwords ?

Mainly this can be a concept under NLP and it means essentially the most commonly used words in a sentence. For instance, articles like and helping verbs etc. There are good amount of words in English where we use them incessantly to construct a sentence. Although we remove these stopwords from a sentence, still we will understand the bottom meaning of it.

Let me show you an example,

Original Paragraph : A stop word is a commonly used word that a search engine has been programmed to disregard, each when indexing entries for searching and when retrieving them as the results of a search query.

Let’s start,

First we’d like to have pre-defined packages nltk and stopwords

import nltk


from nltk.corpus import stopwords

Next we’ll take a listing of stopwords using

stop_words = stopwords.words(‘english’)

Next, we will have our own custom method to ascertain a word in the unique paragraph present in stopwords list or not. Based on it we will get sentences without stopwords.

Attached the code snippet.

These concept is used to get the bottom meaning of particular sentence. In the subsequent blog, let’s discuss yet another concept of NLP.

If you may have any suggestions or questions, post them within the comments .



Please enter your comment!
Please enter your name here