mirror of https://github.com/fxsjy/jieba.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
351 B
Python
11 lines
351 B
Python
#encoding=utf-8
|
|
import jieba
|
|
|
|
seg_list = jieba.cut("我来到北京清华大学",cut_all=True)
|
|
print "Full Mode:", "/ ".join(seg_list) #全模式
|
|
|
|
seg_list = jieba.cut("我来到北京清华大学",cut_all=False)
|
|
print "Default Mode:", "/ ".join(seg_list) #默认模式
|
|
|
|
seg_list = jieba.cut("他来到了网易杭研大厦")
|
|
print ", ".join(seg_list) |