'Check if vocabulary is empty or missing (not fit-ed)'

def _check_vocabulary(self):

    msg = u"%(name)s    -    Vocabulary    wasn't    fitted."
    (check_is_fitted(self, u'vocabulary_', msg=msg),)
    if (len(self.vocabulary_) == 0):
        raise ValueError(u'Vocabulary    is    empty')
