我需要從文本中獲得最受歡迎的ngrams。 Ngrams長度必須從1到5個單詞。 我知道如何獲得bigrams和trigrams。例如: bigram_measures = nltk.collocations.BigramAssocMeasures()
finder = nltk.collocations.BigramCollocationFinder.from_words(words)
fi
我跑了網格搜索分類從下面的IPython: http://scikit-learn.org/dev/auto_examples/grid_search_digits.html ,然後試圖通過酸洗序列化,但收到以下回溯: In [6]: with open('clf.pkl', 'wb') as f:
cPickle.dump(clf, f)
...:
-----------