看板
[ Python ]
討論串[問題] Bag of words 中文單字詞問題
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
我自己來回答. 預設過濾掉一個字符長度的詞. text = ["我|,|愛你|白Z",. "他|愛狗",. "貓|愛鼠". ]. vectorizer = CountVectorizer(min_df=1, token_pattern='(?u)\\b\\w+\\b'). vectorizer.fi
(還有333個字)
內容預覽:
from sklearn.feature_extraction.text import CountVectorizer. text = [. "我|愛你",. "他|愛狗",. "貓|愛鼠". ]. vectorizer = CountVectorizer(). vectorizer.fit(tex
(還有348個字)
首頁
上一頁
1
下一頁
尾頁