# Go jeiba ### 安裝問題 :::info 有鑑於gcc 被我關掉了所以會有出現一些`compiller` 問題 ::: :::danger 我這邊有把說明寫上去了 [issue解決](https://github.com/yanyiwu/gojieba/issues/90) ::: ### 範例使用 [官方範例](https://github.com/yanyiwu/gojieba) ### 新增字典 ``` =go s = "比特币" words = x.Cut(s, use_hmm) fmt.Println(s) fmt.Println("精确模式:", strings.Join(words, "/")) x.AddWord("比特币") words = x.Cut(s, use_hmm) fmt.Println(s) fmt.Println("添加词典后,精确模式:", strings.Join(words, "/")) ``` :::info 我們可以在這邊找出相關差異(把我所想要的文字加入字典不然原本會辨識不出來 ::: ``` =cmd 比特币 精确模式: 比特/币 比特币 添加词典后,精确模式: 比特币 ``` ### cut word 這是很基本切字 之後用one hot encoder去撰寫 word index 就可以運用餘閒相似找出相似文字 ### classic problem 分類問題