Pipeline¶
Supports pipelining ConvoKit transformers.
-
class
convokit.convokitPipeline.
ConvokitPipeline
(steps)¶ A pipeline of transformers. Builds on and inherits functionality from scikit-learn’s Pipeline class.
Parameters: steps – a list of (name, transformer) tuples in the order that they are to be called. -
transform
(corpus, **params)¶ Transform the data, and apply transform with the final estimator.
Call transform of each transformer in the pipeline. The transformed data are finally passed to the final estimator that calls transform method. Only valid if the final estimator implements transform.
This also works where final estimator is None in which case all prior transformations are applied.
- X : iterable
- Data to transform. Must fulfill input requirements of first step of the pipeline.
- Xt : ndarray of shape (n_samples, n_transformed_features)
- Transformed data.
-
transform_utterance
(utt, **params)¶ Computes attributes of an individual string or utterance using all of the transformers in the pipeline.
Parameters: utt – the utterance to compute attributes for. Returns: the utterance, with new attributes.
-