mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
Update __init__.py
calc的idx参数没用
This commit is contained in:
parent
99748bfc17
commit
9cb76dd8b9
@ -135,7 +135,7 @@ def __cut_all(sentence):
|
|||||||
old_j = j
|
old_j = j
|
||||||
|
|
||||||
|
|
||||||
def calc(sentence, DAG, idx, route):
|
def calc(sentence, DAG, route):
|
||||||
N = len(sentence)
|
N = len(sentence)
|
||||||
route[N] = (0.0, '')
|
route[N] = (0.0, '')
|
||||||
for idx in xrange(N-1, -1, -1):
|
for idx in xrange(N-1, -1, -1):
|
||||||
@ -164,7 +164,7 @@ def __cut_DAG_NO_HMM(sentence):
|
|||||||
re_eng = re.compile(ur'[a-zA-Z0-9]',re.U)
|
re_eng = re.compile(ur'[a-zA-Z0-9]',re.U)
|
||||||
DAG = get_DAG(sentence)
|
DAG = get_DAG(sentence)
|
||||||
route = {}
|
route = {}
|
||||||
calc(sentence, DAG, 0, route)
|
calc(sentence, DAG, route)
|
||||||
x = 0
|
x = 0
|
||||||
N = len(sentence)
|
N = len(sentence)
|
||||||
buf = u''
|
buf = u''
|
||||||
@ -187,7 +187,7 @@ def __cut_DAG_NO_HMM(sentence):
|
|||||||
def __cut_DAG(sentence):
|
def __cut_DAG(sentence):
|
||||||
DAG = get_DAG(sentence)
|
DAG = get_DAG(sentence)
|
||||||
route = {}
|
route = {}
|
||||||
calc(sentence, DAG, 0, route=route)
|
calc(sentence, DAG, route=route)
|
||||||
x = 0
|
x = 0
|
||||||
buf = u''
|
buf = u''
|
||||||
N = len(sentence)
|
N = len(sentence)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user