[Hindi]NLP 17# Stop Words |NLP|Python 3|Natural Language Processing|2019
Code:
# -*- coding: utf-8 -*-
"""NLP_Ex11
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/179DVM1omPDP7pSa6-TIinfu_ZrvHH_Uq
"""
import spacy
nlp =spacy.load('en_core_web_sm')
print(nlp.Defaults.stop_words)
len(nlp.Defaults.stop_words)
nlp.vocab['is'].is_stop
nlp.vocab['Vishwajeet'].is_stop
nlp.Defaults.stop_words.add('pfa')
nlp.vocab['pfa'].is_stop = True
len(nlp.Defaults.stop_words)
nlp.vocab['pfa'].is_stop
nlp.Defaults.stop_words.remove('among')
nlp.vocab['among'].is_stop = False
nlp.vocab['among'].is_stop
"""NLP_Ex11
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/179DVM1omPDP7pSa6-TIinfu_ZrvHH_Uq
"""
import spacy
nlp =spacy.load('en_core_web_sm')
print(nlp.Defaults.stop_words)
len(nlp.Defaults.stop_words)
nlp.vocab['is'].is_stop
nlp.vocab['Vishwajeet'].is_stop
nlp.Defaults.stop_words.add('pfa')
nlp.vocab['pfa'].is_stop = True
len(nlp.Defaults.stop_words)
nlp.vocab['pfa'].is_stop
nlp.Defaults.stop_words.remove('among')
nlp.vocab['among'].is_stop = False
nlp.vocab['among'].is_stop
0 Comments