class_docstr: Wrapper of the scikit-learn TfidfVectorizer
class_docstr_tok: ["Wrapper","of","the","scikit-learn","TfidfVectorizer"]
docstr: Fits the idf of the vectorizer on the given utterances after
  enriching them with builtin entities matches, custom entities matches
  and the potential word clusters matches.
  Returns the featurized utterances.
  
  Args:
      x (list of dict): list of utterances
      dataset (dict): dataset from which x was extracted (needed to
          extract the language and the builtin entity scope)
  
  Returns:
      :class:`.scipy.sparse.csr_matrix`: A sparse matrix X of shape
      (len(x), len(self.vocabulary)) where X[i, j] contains tfdif of
      the ngram of index j of the vocabulary in the utterance i
docstr_tok: ["Fits","the","idf","of","the","vectorizer","on","the","given","utterances","after","enriching","them","with","builtin","entities","matches",",","custom","entities","matches","and","the","potential","word","clusters","matches",".","Returns","the","featurized","utterances",".","Args",":","x","(","list","of","dict",")",":","list","of","utterances","dataset","(","dict",")",":","dataset","from","which","x","was","extracted","(","needed","to","extract","the","language","and","the","builtin","entity","scope",")","Returns",":",":","class",":","`",".scipy.sparse.csr_matrix","`",":","A","sparse","matrix","X","of","shape","(","len","(","x",")",",","len","(","self.vocabulary",")",")","where","X","[","i",",","j","]","contains","tfdif","of","the","ngram","of","index","j","of","the","vocabulary","in","the","utterance","i"]
code: def fit_transform(self, x, dataset):
      """Fits the idf of the vectorizer on the given utterances after
      enriching them with builtin entities matches, custom entities matches
      and the potential word clusters matches.
      Returns the featurized utterances.
  
      Args:
          x (list of dict): list of utterances
          dataset (dict): dataset from which x was extracted (needed to
              extract the language and the builtin entity scope)
  
      Returns:
          :class:`.scipy.sparse.csr_matrix`: A sparse matrix X of shape
          (len(x), len(self.vocabulary)) where X[i, j] contains tfdif of
          the ngram of index j of the vocabulary in the utterance i
      """
      self.load_resources_if_needed(dataset[LANGUAGE])
      self.fit_builtin_entity_parser_if_needed(dataset)
      self.fit_custom_entity_parser_if_needed(dataset)
  
      self._language = dataset[LANGUAGE]
      self._init_vectorizer(self._language)
      self.builtin_entity_scope = set(
          e for e in dataset[ENTITIES] if is_builtin_entity(e)
      )
      preprocessed_data = self._preprocess(x)
      utterances = [
          self._enrich_utterance(
              u, builtin_ents, custom_ents, w_clusters
          )
          for u, builtin_ents, custom_ents, w_clusters in zip(
              *preprocessed_data
          )
      ]
      return self._tfidf_vectorizer.fit_transform(utterances)
  
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 3 for calling the TfidfVectorizer obj's underlying member method code with example usage: obj.fit_transform(x, dataset) and returns: self