This commit is contained in:
ZoeyYoung 2013-08-21 19:46:14 +08:00
parent ebd40ed65e
commit 25839b5127
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ def load_model():
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)
f.closed

View File

@ -41,13 +41,13 @@ def load_model(f_name,isJython=True):
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)
f.closed
state = {}
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)
f.closed