def transform(self, transformer):
self.transformers.append(transformer)<EOL>from languageflow.transformer.tagged import TaggedTransformer<EOL>if isinstance(transformer, TaggedTransformer):<EOL><INDENT>self.X, self.y = transformer.transform(self.sentences)<EOL><DEDENT>if isinstance(transformer, TfidfVectorizer):<EOL><INDENT>self.X = transformer.fit_transform(self.X)<EOL><DEDENT>if isinstance(transformer, CountVectorizer):<EOL><INDENT>self.X = transformer.fit_transform(self.X)<EOL><DEDENT>if isinstance(transformer, NumberRemover):<EOL><INDENT>self.X = transformer.transform(self.X)<EOL><DEDENT>if isinstance(transformer, MultiLabelBinarizer):<EOL><INDENT>self.y = transformer.fit_transform(self.y)<EOL><DEDENT>
Add transformer to flow and apply transformer to data in flow

Parameters
----------
transformer : Transformer
    a transformer to transform data