In my scikits-learn Pipeline, I would like to pass a custom vocabulary to CountVectorizer():
text_classifier = Pipeline([
('count', CountVectorizer(vocabulary=myvocab)),
('tfidf', TfidfTransformer()),
('clf', LinearSVC(C=1000))
])
However, as far as I understand when I call
text_classifier.fit(X_train, y_train)
Pipeline uses the fit_transform() method of CountVectorizer(), which ignores myvocab. How could I modify my Pipeline to use myvocab? Thanks!