jieba word, the word will have to convert the data type is List,

seg_list = jieba.cut ( "He came NetEase Hangzhou Research Building") # The default mode is accurate
print(", ".join(seg_list))
print(type(seg_list)) <class 'generator'>



= PP List (jieba.cut_for_search ( "Master Xiao Ming graduated from the Chinese Academy of Sciences Computing, after studies at Kyoto University, Japan")) # mode search engine
print(pp)    
print(type(pp))   <class 'list'>
print(type(pp[0])) <class 'str'>

Guess you like

Origin blog.csdn.net/x_iesheng/article/details/85035149