3
使用NLTK導入的數據,我可以做text1.dispersion_plot(...)
,但是我無法在單詞/標記列表上使用dispersion_plot()
函數。使用NLTK,如何獲得列表的散佈圖?
我開始了與實現純文本:
令牌= nltk.word_tokenize(...)
它返回一個列表類型。
text1
在NLTK書的背景是class 'nltk.text.Text'
類型。
如何在我自己的文本上使用d ispersion_plot()
和其他功能?
看看'nltk.draw .dispersion.dispersion_plot' – michaelmeyer