Update README.md

pull/50/head
Sun Junyi 12 years ago
parent 9e4fce6b68
commit da635859d4

@ -146,11 +146,14 @@ https://github.com/fxsjy/jieba/raw/master/extra_dict/dict.txt.big
默认情况下jieba采用延迟加载一旦有必要建立trie。这需要1-3秒一次而以之后还没有重新初始化。如果你想手工初始jieba您可以用
import jieba
jieba.initialize()
jieba.initialize() #手动初始化(可选)
在这一步还可以指定要使用的词典(可选):
在0.28之前的版本是不能指定主词典的路径的,有了延迟加载机制后,你可以改变主词典的路径:
jieba.set_dictionary('data/dict.txt.big')
例子: https://github.com/fxsjy/jieba/blob/master/test/test_change_dictpath.py
jieba.initialize('data/dict.txt.big')
分词速度
=========
@ -276,11 +279,11 @@ Initialization
By default, Jieba employs lazy loading to only build the trie once it is necessary. This takes 1-3 seconds once, after which it is not initialized again. If you want to initialize Jieba manually, you can call:
import jieba
jieba.initialize()
jieba.initialize() #(optional)
You can also specify the dictionary to use in this step (optional):
You can also specify the dictionary (not supported before version 0.28) :
jieba.initialize('data/dict.txt.big')
jieba.set_dictionary('data/dict.txt.big')
Segmentation speed
=========

Loading…
Cancel
Save