Hi,
Can I know how to use custom stop words to exclude the word's from scattertext plot. I am trying to do so but failed. Can you guide regarding this. The code snippet is attached.
english_stopwords = {
stopword for stopword in
pd.read_csv('/Users/meeqat.suharwardy/Desktop/stopwords.txt', sep=" ", lineterminator='\n')
if stopword.strip()
}
not_a_word = re.compile(r'^\W+$')
print(english_stopwords)
corpus = st.CorpusFromPandas(convention_df,
category_col='Speaker',
text_col='Text',
nlp=st.whitespace_nlp_with_sentences ).build(
).remove_terms(english_stopwords, ignore_absences=True)
Hi, Can I know how to use custom stop words to exclude the word's from scattertext plot. I am trying to do so but failed. Can you guide regarding this. The code snippet is attached.
english_stopwords = { stopword for stopword in pd.read_csv('/Users/meeqat.suharwardy/Desktop/stopwords.txt', sep=" ", lineterminator='\n') if stopword.strip() } not_a_word = re.compile(r'^\W+$')
print(english_stopwords)
corpus = st.CorpusFromPandas(convention_df, category_col='Speaker', text_col='Text', nlp=st.whitespace_nlp_with_sentences ).build( ).remove_terms(english_stopwords, ignore_absences=True)