Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

spacy add stopwords

import spacy    
nlp = spacy.load("en")
# To add a single stopword:
nlp.Defaults.stop_words.add("my_new_stopword")

# To remove a single stopword:
nlp.Defaults.stop_words.remove("whatever")

# To see the current set of stopwords, use:
print(nlp.Defaults.stop_words)
 
PREVIOUS NEXT
Tagged: #spacy #add #stopwords
ADD COMMENT
Topic
Name
6+5 =