mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
fix bug
This commit is contained in:
parent
ebd40ed65e
commit
25839b5127
@ -34,7 +34,7 @@ def load_model():
|
|||||||
|
|
||||||
emit_p = {}
|
emit_p = {}
|
||||||
abs_path = os.path.join(_curpath, PROB_EMIT_P)
|
abs_path = os.path.join(_curpath, PROB_EMIT_P)
|
||||||
with file(abs_path, 'rb') as f:
|
with open(abs_path, 'rb') as f:
|
||||||
emit_p = marshal.load(f)
|
emit_p = marshal.load(f)
|
||||||
f.closed
|
f.closed
|
||||||
|
|
||||||
|
@ -41,13 +41,13 @@ def load_model(f_name,isJython=True):
|
|||||||
|
|
||||||
emit_p = {}
|
emit_p = {}
|
||||||
abs_path = os.path.join(_curpath, PROB_EMIT_P)
|
abs_path = os.path.join(_curpath, PROB_EMIT_P)
|
||||||
with file(abs_path, 'rb') as f:
|
with open(abs_path, 'rb') as f:
|
||||||
emit_p = marshal.load(f)
|
emit_p = marshal.load(f)
|
||||||
f.closed
|
f.closed
|
||||||
|
|
||||||
state = {}
|
state = {}
|
||||||
abs_path = os.path.join(_curpath, CHAR_STATE_TAB_P)
|
abs_path = os.path.join(_curpath, CHAR_STATE_TAB_P)
|
||||||
with file(abs_path, 'rb') as f:
|
with open(abs_path, 'rb') as f:
|
||||||
state = marshal.load(f)
|
state = marshal.load(f)
|
||||||
f.closed
|
f.closed
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user