mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
自动检测CPU数目,启动合适数目的进程。
This commit is contained in:
parent
1dbc525dff
commit
5d83855088
@ -3,8 +3,8 @@ import sys,time
|
||||
import sys
|
||||
sys.path.append("../../")
|
||||
import jieba
|
||||
import multiprocessing
|
||||
jieba.enable_parallel(multiprocessing.cpu_count())
|
||||
|
||||
jieba.enable_parallel()
|
||||
|
||||
url = sys.argv[1]
|
||||
content = open(url,"rb").read()
|
||||
|
Loading…
x
Reference in New Issue
Block a user