(self)
Check that instance has a valid vocabulary mapping;
        if not, raise a ValueError.
Check that instance has a valid vocabulary mapping;
        if not, raise a ValueError.
Check that instance has a valid vocabulary mapping ; if not raise a ValueError .
def _check_vocabulary(self):
        """
        Check that instance has a valid vocabulary mapping;
        if not, raise a ValueError.
        """
        if not isinstance(self.vocabulary_terms, collections.abc.Mapping):
            raise ValueError("vocabulary hasn't been built; call `Vectorizer.fit()`")
        if len(self.vocabulary_terms) == 0:
            raise ValueError("vocabulary is empty")
def _check_vocabulary ( self ) : if not isinstance ( self . vocabulary_terms , collections . abc . Mapping ) : raise ValueError ( "vocabulary hasn't been built; call `Vectorizer.fit()`" ) if len ( self . vocabulary_terms ) == 0 : raise ValueError ( "vocabulary is empty" )