Contents

6.14.8.3. scikits.learn.feature_extraction.text.sparse.Vectorizer

Vectorizer(analyzer=WordNGramAnalyzer(max_n=1, min_n=1, charset='utf-8',
stop_words=set(['all', 'six', 'less', 'being', 'indeed', 'over', 'move', 'anyway', 'four', 'not', 'own', 'through', 'yourselves', 'fify', 'where', 'mill', 'only', 'find', 'before', 'one', 'whose', 'system', 'how', 'somewhere', 'with', 'thick', 'show', 'had', 'enough', 'should', 'to', 'must', 'whom',...'amoungst', 'yours', 'their', 'rather', 'without', 'so', 'five', 'the', 'first', 'whereas', 'once']),
preprocessor=RomanPreprocessor()), max_df=1.0, max_features=None, use_tf=True, use_idf=True)

Convert a collection of raw documents to a sparse matrix

Equivalent to CountVectorizer followed by TfidfTransformer.

Methods

fit
fit_transform
transform
Vectorizer.fit_transform(raw_documents)

Learn the representation and return the vectors.

Parameters :

raw_documents: iterable :

an iterable which yields either str, unicode or file objects

Returns :

vectors: array, [n_samples, n_features] :

Vectorizer.transform(raw_documents, copy=True)

Return the vectors.

Parameters :

raw_documents: iterable :

an iterable which yields either str, unicode or file objects

Returns :

vectors: array, [n_samples, n_features] :