(
        self, doc_term_matrix: sp.csr_matrix, vocabulary: Dict[str, int]
    )
return doc_term_matrix, vocabulary
Filter terms in ``vocabulary`` by their document frequency or information
        content, as specified in :class:`Vectorizer` initialization.

        Args:
            doc_term_matrix
            vocabulary

        Returns:
            Filtered document-term matrix and filtered vocabulary to go with it.
Filter terms in ``vocabulary`` by their document frequency or information
        content, as specified in :class:`Vectorizer` initialization.
Filter terms in vocabulary by their document frequency or information content as specified in : class : Vectorizer initialization .
def _filter_terms(
        self, doc_term_matrix: sp.csr_matrix, vocabulary: Dict[str, int]
    ) -> Tuple[sp.csr_matrix, Dict[str, int]]:
        """
        Filter terms in ``vocabulary`` by their document frequency or information
        content, as specified in :class:`Vectorizer` initialization.

        Args:
            doc_term_matrix
            vocabulary

        Returns:
            Filtered document-term matrix and filtered vocabulary to go with it.
        """
        if self.max_df != 1.0 or self.min_df != 1 or self.max_n_terms is not None:
            doc_term_matrix, vocabulary = filter_terms_by_df(
                doc_term_matrix,
                vocabulary,
                max_df=self.max_df,
                min_df=self.min_df,
                max_n_terms=self.max_n_terms,
            )
        return doc_term_matrix, vocabulary
def _filter_terms ( self , doc_term_matrix : sp . csr_matrix , vocabulary : Dict [ str , int ] ) -> Tuple [ sp . csr_matrix , Dict [ str , int ] ] : if self . max_df != 1.0 or self . min_df != 1 or self . max_n_terms is not None : doc_term_matrix , vocabulary = filter_terms_by_df ( doc_term_matrix , vocabulary , max_df = self . max_df , min_df = self . min_df , max_n_terms = self . max_n_terms , ) return doc_term_matrix , vocabulary