remove a bug prone role

This commit is contained in:
fxsjy 2012-10-08 20:52:35 +08:00
parent 004f720bd0
commit c8b1cb0c88
2 changed files with 2 additions and 5 deletions

View File

@ -27,10 +27,7 @@ def viterbi(obs, states, start_p, trans_p, emit_p):
newpath[y] = path[state] + [y] newpath[y] = path[state] + [y]
path = newpath 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 states])
(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')])
return (prob, path[state]) return (prob, path[state])

View File

@ -1,6 +1,6 @@
from distutils.core import setup from distutils.core import setup
setup(name='jieba', setup(name='jieba',
version='0.14', version='0.15',
description='Chinese Words Segementation Utilities', description='Chinese Words Segementation Utilities',
author='Sun, Junyi', author='Sun, Junyi',
author_email='ccnusjy@gmail.com', author_email='ccnusjy@gmail.com',