diff --git a/jieba/finalseg/__init__.py b/jieba/finalseg/__init__.py index dd124fe..7680e95 100644 --- a/jieba/finalseg/__init__.py +++ b/jieba/finalseg/__init__.py @@ -27,10 +27,7 @@ def viterbi(obs, states, start_p, trans_p, emit_p): newpath[y] = path[state] + [y] path = newpath - if emit_p['M'].get(obs[-1],0)> emit_p['S'].get(obs[-1],0): - (prob, state) = max([(V[len(obs) - 1][y], y) for y in ('E',)]) - else: - (prob, state) = max([(V[len(obs) - 1][y], y) for y in ('E','S')]) + (prob, state) = max([(V[len(obs) - 1][y], y) for y in states]) return (prob, path[state]) diff --git a/setup.py b/setup.py index 045d2b0..e4265b6 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from distutils.core import setup setup(name='jieba', - version='0.14', + version='0.15', description='Chinese Words Segementation Utilities', author='Sun, Junyi', author_email='ccnusjy@gmail.com',