class_docstr: Wrapper of the scikit-learn TfidfVectorizer
class_docstr_tok: ["Wrapper","of","the","scikit-learn","TfidfVectorizer"]
code: def from_path(cls, path, **shared):
      import numpy as np
      import scipy.sparse as sp
      from sklearn.feature_extraction.text import (
          TfidfTransformer,
          TfidfVectorizer as SklearnTfidfVectorizer,
      )
  
      path = Path(path)
  
      model_path = path / "vectorizer.json"
      if not model_path.exists():
          raise LoadingError(
              "Missing vectorizer model file: %s" % model_path.name
          )
      with model_path.open("r", encoding="utf-8") as f:
          vectorizer_dict = json.load(f)
  
      vectorizer = cls(vectorizer_dict["config"], **shared)
      vectorizer._language = vectorizer_dict["language_code"]
  
      builtin_entity_scope = vectorizer_dict["builtin_entity_scope"]
      if builtin_entity_scope is not None:
          builtin_entity_scope = set(builtin_entity_scope)
      vectorizer.builtin_entity_scope = builtin_entity_scope
  
      vectorizer_ = vectorizer_dict["vectorizer"]
      if vectorizer_:
          vocab = vectorizer_["vocab"]
          idf_diag_data = vectorizer_["idf_diag"]
          idf_diag_data = np.array(idf_diag_data)
  
          idf_diag_shape = (len(idf_diag_data), len(idf_diag_data))
          row = list(range(idf_diag_shape[0]))
          col = list(range(idf_diag_shape[0]))
          idf_diag = sp.csr_matrix(
              (idf_diag_data, (row, col)), shape=idf_diag_shape
          )
  
          tfidf_transformer = TfidfTransformer()
          tfidf_transformer._idf_diag = idf_diag
  
          vectorizer_ = SklearnTfidfVectorizer(
              tokenizer=lambda x: tokenize_light(
                  x, vectorizer._language
              )
          )
          vectorizer_.vocabulary_ = vocab
  
          vectorizer_._tfidf = tfidf_transformer
  
      vectorizer._tfidf_vectorizer = vectorizer_
      return vectorizer
  
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 14 for calling the TfidfVectorizer obj's underlying member method code with example usage: obj.from_path(cls, path) and returns: vectorizer