forked from fxsjy/jieba
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
42 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from distutils.core import setup | ||
setup(name='jieba', | ||
version='0.27', | ||
version='0.28', | ||
description='Chinese Words Segementation Utilities', | ||
author='Sun, Junyi', | ||
author_email='[email protected]', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
好人 12 n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#encoding=utf-8 | ||
import sys | ||
sys.path.append("../") | ||
import jieba | ||
|
||
def cuttest(test_sent): | ||
result = jieba.cut(test_sent) | ||
print " ".join(result) | ||
|
||
def testcase(): | ||
cuttest("这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。") | ||
cuttest("我不喜欢日本和服。") | ||
cuttest("雷猴回归人间。") | ||
cuttest("工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作") | ||
cuttest("我需要廉租房") | ||
cuttest("永和服装饰品有限公司") | ||
cuttest("我爱北京天安门") | ||
cuttest("abc") | ||
cuttest("隐马尔可夫") | ||
cuttest("雷猴是个好网站") | ||
|
||
if __name__ == "__main__": | ||
testcase() | ||
jieba.set_dictionary("foobar.txt") | ||
print "================================" | ||
testcase() | ||
|
This file was deleted.
Oops, something went wrong.