How do I use sklearn CountVectorizer with both 'word' and 'char' analyzer? - python
问题 How do I use sklearn CountVectorizer with both 'word' and 'char' analyzer? http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html I could extract the text features by word or char separately but how do i create a charword_vectorizer ? Is there a way to combine the vectorizers? or use more than one analyzer? >>> from sklearn.feature_extraction.text import CountVectorizer >>> word_vectorizer = CountVectorizer(analyzer='word', ngram_range=(1, 2),