def cut_with_stop_words(string): segs = jieba.lcut(string) final = '' for seg in segs: if seg not in stopwords: final = final + seg return final