Python Jieba Library (ZH) Case

http://blog.fukuball.com/ru-he-shi-yong-jieba-jie-ba-zhong-wen-fen-ci-cheng-shi/


#encoding=utf-8
import jieba

content = open('lyric.txt', 'rb').read()

print "Input:", content

words = jieba.cut(content, cut_all=False)

print "Output 精確模式 Full Mode:"
for word in words:
    print word



關於結巴(Jieba)斷詞的幾個問題

建立台灣繁體版本的結巴時的一些心得。他一個詞只能有一個詞性,如:機車只能是名詞或形容詞的其中一個,不能在A句子中當名詞,B句子中當形容詞。中研院的斷詞系統有提供多詞性,請去用這個。




fukuball slides
Deep Learning LSTM模型來斷詞

Comments

Popular Posts