stopword.py
def fit(self, X, y=None):
        """A reference implementation of a fitting function for a transformer.

        Parameters
        ----------
        X : array-like or sparse matrix of shape = [n_samples, n_features]
            The training input samples.
        y : None
            There is no need of a target in a transformer, yet the pipeline API
            requires this parameter.

        Returns
        -------
        self : object
            Returns self.
        """
        X = np.array(X)
        self.input_shape_ = X.shape
        self.y_ = y

        self.vocab = set(' '.join(X).split())

        self.X_ = X

        if not self.threshold:
            self.threshold = self.calculate_threshold()

        self.add_high_tf()
        if self.singletons:
            self.add_singleton()
        self.add_low_idf()
        # Return the transformer
        return self
A reference implementation of a fitting function for a transformer.

        Parameters
        ----------
        X : array-like or sparse matrix of shape = [n_samples, n_features]
            The training input samples.
        y : None
            There is no need of a target in a transformer, yet the pipeline API
            requires this parameter.

        Returns
        -------
        self : object
            Returns self.
        
A reference implementation of a fitting function for a transformer.
Parameters

X : array-like or sparse matrix of shape = [n_samples, n_features]
The training input samples.
y : None
There is no need of a target in a transformer, yet the pipeline API
requires this parameter.

Returns

self : object
Returns self.
A reference implementation of a fitting function for a transformer . Parameters X : array - like or sparse matrix of shape = [ n_samples n_features ] The training input samples . y : None There is no need of a target in a transformer yet the pipeline API requires this parameter . Returns self : object Returns self .
def fit(self, X, y=None):
        X = np.array(X)
        self.input_shape_ = X.shape
        self.y_ = y
        self.vocab = set(' '.join(X).split())
        self.X_ = X
        if not self.threshold:
            self.threshold = self.calculate_threshold()
        self.add_high_tf()
        if self.singletons:
            self.add_singleton()
        self.add_low_idf()
        return self
def fit ( self , X , y = None ) : X = np . array ( X ) self . input_shape_ = X . shape self . y_ = y self . vocab = set ( ' ' . join ( X ) . split ( ) ) self . X_ = X if not self . threshold : self . threshold = self . calculate_threshold ( ) self . add_high_tf ( ) if self . singletons : self . add_singleton ( ) self . add_low_idf ( ) return self
A reference implementation of a fitting function for a transformer.
A reference implementation of a fitting function for a transformer .
"""A reference implementation of a fitting function for a transformer.

        Parameters
        ----------
        X : array-like or sparse matrix of shape = [n_samples, n_features]
            The training input samples.
        y : None
            There is no need of a target in a transformer, yet the pipeline API
            requires this parameter.

        Returns
        -------
        self : object
            Returns self.
        """ # Return the transformer
self
X
y