---
title: "Discussion on \"結巴分詞解析三部曲, 第三集\" | Hashnode"
description: "Discussion on \"結巴分詞解析三部曲, 第三集\". How jieba works, part 3\n本篇將用 Part 2 介紹的隱藏式馬可夫模型與 Viterbi 演算法將剩下的字 (大、學、與、老、師、討、論、力、學) 分詞。\n字的隱藏狀態\n\n一個人的身體可以有健康、生病的隱藏狀態。那一個字可以有幾種？結巴的程式碼定義了四種隱藏狀態：詞首、詞中、詞尾、以及單獨存在，分別用 B, M, E, S 標示。這四種狀態其實就是字位於詞的不同位置。\n例如：\n\n我: S\n『我』只有一個字，所以標示 S 單獨存在。\n\n\n的: S\n『的』只有一個字，所以標示..."
url: "https://hashnode.com/posts/how-jieba-works-part-3/62ffb5e667b2030c206c2553"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [結巴分詞解析三部曲, 第三集](https://ericlin.hashnode.dev/how-jieba-works-part-3?utm_source=hashnode&utm_medium=feed)

How jieba works, part 3 本篇將用 Part 2 介紹的隱藏式馬可夫模型與 Viterbi 演算法將剩下的字 (大、學、與、老、師、討、論、力、學) 分詞。 字的隱藏狀態 一個人的身體可以有健康、生病的隱藏狀態。那一個字可以有幾種？結巴的程式碼定義了四種隱藏狀態：詞首、詞中、詞尾、以及單獨存在，分別用 B, M, E, S 標示。這四種狀態其實就是字位於詞的不同位置。 例如： 我: S 『我』只有一個字，所以標示 S 單獨存在。 的: S 『的』只有一個字，所以標示...

Aug 19, 2022 · 9 min read · ericlin.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#jieba](https://hashnode.com/tag/jieba)
-   [#nlp](https://hashnode.com/tag/nlp)
-   [#hidden-markov-model](https://hashnode.com/tag/hidden-markov-model)
-   [#viterbi](https://hashnode.com/tag/viterbi)

## Written by

[Eric](https://hashnode.com/@ericlin)

@ericlin

  
[View profile](https://hashnode.com/@ericlin)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
