docstr: Constructs a new tf/idf vectorizer using the sklearn framework.
docstr_tok: ["Constructs","a","new","tf\/idf","vectorizer","using","the","sklearn","framework","."]
code: def __init__(
      self,
      config: Dict[Text, Any],
      name: Text,
      model_storage: ModelStorage,
      resource: Resource,
  ) -> None:
      """Constructs a new tf/idf vectorizer using the sklearn framework."""
      super().__init__(name, config)
      # Initialize the tfidf sklearn component
      self.tfm = TfidfVectorizer(
          analyzer=config["analyzer"],
          ngram_range=(config["min_ngram"], config["max_ngram"]),
      )
  
      # We need to use these later when saving the trained component.
      self._model_storage = model_storage
      self._resource = resource
  
imports: import logging
  from typing import Any, Text, Dict, List, Type
  from sklearn.feature_extraction.text import TfidfVectorizer
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.graph import ExecutionContext, GraphComponent
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.nlu.featurizers.sparse_featurizer.sparse_featurizer import SparseFeaturizer
  from rasa.nlu.tokenizers.tokenizer import Tokenizer
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.constants import DENSE_FEATURIZABLE_ATTRIBUTES, FEATURIZER_CLASS_ALIAS
  from joblib import dump, load
  from rasa.shared.nlu.constants import TEXT, TEXT_TOKENS, FEATURE_TYPE_SENTENCE, FEATURE_TYPE_SEQUENCE
label_desc: Use image node_id 4 to create a new TfIdfFeaturizer object from inherited base classes: SparseFeaturizer, GraphComponent with example: obj = TfIdfFeaturizer(config, name, model_storage, resource)