1
0
mirror of https://github.com/fumiama/jieba.git synced 2026-06-08 10:30:23 +08:00

make some public variable/function to private

This commit is contained in:
Wang Bin
2015-02-28 17:40:58 +08:00
parent 2c6a897751
commit b23dc63eb2
2 changed files with 261 additions and 261 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -55,7 +55,7 @@ func viterbi(obs []rune) (float64, []stateTag) {
mem_path[0] = make(map[stateTag]stateTag)
ys := charStateTab.get(obs[0]) // default is all_states
for _, y := range ys {
V[0][y] = ProbEmit[y].Get(obs[0]) + ProbStart[y]
V[0][y] = probEmit[y].get(obs[0]) + ProbStart[y]
mem_path[0][y] = emptyStateTag()
}
for t := 1; t < obsLength; t++ {
@@ -94,7 +94,7 @@ func viterbi(obs []rune) (float64, []stateTag) {
pss := make(probStates, 0)
for _, y0 := range prev_states {
ps := probState{
Prob: V[t-1][y0] + probTrans[y0].Get(y) + ProbEmit[y].Get(obs[t]),
Prob: V[t-1][y0] + probTrans[y0].Get(y) + probEmit[y].get(obs[t]),
ST: y0}
pss = append(pss, ps)
}