class_docstr: Adds message features based on regex expressions.
class_docstr_tok: ["Adds","message","features","based","on","regex","expressions","."]
docstr: Constructs new features for regexes and lookup table using regex expressions.
  
  Args:
      config: Configuration for the component.
      model_storage: Storage which graph components can use to persist and load
          themselves.
      resource: Resource locator for this component which can be used to persist
          and load itself from the `model_storage`.
      execution_context: Information about the current graph run.
      known_patterns: Regex Patterns the component should pre-load itself with.
docstr_tok: ["Constructs","new","features","for","regexes","and","lookup","table","using","regex","expressions",".","Args",":","config",":","Configuration","for","the","component",".","model_storage",":","Storage","which","graph","components","can","use","to","persist","and","load","themselves",".","resource",":","Resource","locator","for","this","component","which","can","be","used","to","persist","and","load","itself","from","the","`","model_storage","`",".","execution_context",":","Information","about","the","current","graph","run",".","known_patterns",":","Regex","Patterns","the","component","should","pre-load","itself","with","."]
code: def __init__(
      self,
      config: Dict[Text, Any],
      model_storage: ModelStorage,
      resource: Resource,
      execution_context: ExecutionContext,
      known_patterns: Optional[List[Dict[Text, Text]]] = None,
  ) -> None:
      """Constructs new features for regexes and lookup table using regex expressions.
  
      Args:
          config: Configuration for the component.
          model_storage: Storage which graph components can use to persist and load
              themselves.
          resource: Resource locator for this component which can be used to persist
              and load itself from the `model_storage`.
          execution_context: Information about the current graph run.
          known_patterns: Regex Patterns the component should pre-load itself with.
      """
      super().__init__(execution_context.node_name, config)
  
      self._model_storage = model_storage
      self._resource = resource
  
      self.known_patterns = known_patterns if known_patterns else []
      self.case_sensitive = config["case_sensitive"]
      self.finetune_mode = execution_context.is_finetuning
  
imports: from __future__ import annotations
  import logging
  import re
  from typing import Any, Dict, List, Optional, Text, Tuple, Type
  import numpy
  import scipy.sparse
  from rasa.nlu.tokenizers.tokenizer import Tokenizer
  import rasa.shared.utils.io
  import rasa.utils.io
  import rasa.nlu.utils.pattern_utils
  from rasa.engine.graph import ExecutionContext, GraphComponent
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.nlu.constants import TOKENS_NAMES
  from rasa.nlu.featurizers.sparse_featurizer.sparse_featurizer import SparseFeaturizer
  from rasa.shared.nlu.constants import TEXT, RESPONSE, ACTION_TEXT
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 3 to create a new RegexFeaturizer object from inherited base classes: SparseFeaturizer, GraphComponent with example: obj = RegexFeaturizer(config, model_storage, resource, execution_context, known_patterns)