<jupyter_start><jupyter_text>Stop Words in SpaCy* A Stop word/Stop list.* Words filtered out before preprocessing.* Most common words.* ![Imgur](https://i.imgur.com/0hREEzI.jpg)  Uses* Improve Performance in search engine* * eg how to perform sentiment analysis with spacy* Eliminating noise and distraction in sentiment classification* * Make ML learning faster due to less features* *<jupyter_code>import spacy
nlp=spacy.load('en')
from spacy.lang.en.stop_words import STOP_WORDS
print(STOP_WORDS)
len(STOP_WORDS)
nlp.vocab["this"].is_stop
nlp.vocab["theme"].is_stop
nlp.vocab["a"].is_stop
mysentence=nlp(u"This is a sentence about how to use stopwords in Natural language processing")
print("Stop words Below that: ")
for word in mysentence:
    if word.is_stop==True:
        print(word)
print("Non Stop words Below that: ")
for word in mysentence:
    if word.is_stop==False:
        print(word)
print("Non Stop words Below that: ")
[word for word in mysentence if word.is_stop == False]<jupyter_output>Non Stop words Below that:<jupyter_text>Adding Your Stop Words<jupyter_code>STOP_WORDS.add("lol")
nlp.vocab['lol'].is_stop
STOP_WORDS.add("uwlc")
nlp.vocab['uwlc'].is_stop<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11331679073614558, 'fraction_numerical': 0.0008271298593879239, 'mean_word_length': 5.836158192090395, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '627406', 'license': 'MIT', 'n_tokens_mistral': 422, 'n_tokens_neox': 411, 'n_words': 117, 'path': 'notebooks/Stop Words (Checking and Adding Stopwords) of SpaCy (Part-6).ipynb', 'repo_name': 'harunshimanto/homemade-NLP-with-SpaCy', 'size': '1209'}