class_docstr: Feature extractor for text classification relying on ngrams tfidf and
  optionally word cooccurrences features
class_docstr_tok: ["Feature","extractor","for","text","classification","relying","on","ngrams","tfidf","and","optionally","word","cooccurrences","features"]
code: def fit_transform(self, dataset, utterances, classes, none_class):
      import scipy.sparse as sp
  
      dataset = validate_and_format_dataset(dataset)
      self.language = dataset[LANGUAGE]
  
      utterances_texts = (
          get_text_from_chunks(u[DATA]) for u in utterances
      )
      if not any(
          tokenize_light(q, self.language) for q in utterances_texts
      ):
          raise _EmptyDatasetUtterancesError(
              "Tokenized utterances are empty"
          )
  
      x_tfidf = self._fit_transform_tfidf_vectorizer(
          utterances, classes, dataset
      )
      x = x_tfidf
      if self.config.added_cooccurrence_feature_ratio:
          self._fit_cooccurrence_vectorizer(
              utterances, classes, none_class, dataset
          )
          x_cooccurrence = self.cooccurrence_vectorizer.transform(
              utterances
          )
          x = sp.hstack((x_tfidf, x_cooccurrence))
  
      return x
  
imports: from __future__ import division, unicode_literals
  import json
  from builtins import str, zip
  from copy import deepcopy
  from pathlib import Path
  from future.utils import iteritems
  from snips_nlu.common.utils import json_string, fitted_required, replace_entities_with_placeholders, check_persisted_path
  from snips_nlu.constants import DATA, ENTITY, ENTITY_KIND, LANGUAGE, NGRAM, TEXT, ENTITIES
  from snips_nlu.dataset import get_text_from_chunks, validate_and_format_dataset
  from snips_nlu.entity_parser.builtin_entity_parser import is_builtin_entity
  from snips_nlu.exceptions import _EmptyDatasetUtterancesError, LoadingError
  from snips_nlu.languages import get_default_sep
  from snips_nlu.pipeline.configs import FeaturizerConfig
  from snips_nlu.pipeline.configs.intent_classifier import CooccurrenceVectorizerConfig, TfidfVectorizerConfig
  from snips_nlu.pipeline.processing_unit import ProcessingUnit
  from snips_nlu.preprocessing import stem, tokenize_light
  from snips_nlu.resources import get_stop_words, get_word_cluster
  from snips_nlu.slot_filler.features_utils import get_all_ngrams
label_desc: Use image node_id 5 for calling the Featurizer obj's underlying member method code with example usage: obj.fit_transform(dataset, utterances, classes, none_class) and returns: x