class_docstr: Validates a "DefaultV1" configuration against the training data and domain.
class_docstr_tok: ["Validates","a","``","DefaultV1","''","configuration","against","the","training","data","and","domain","."]
docstr: Warns when regex entity extractor is competing with a general one.
  
  This might be the case when the following conditions are all met:
  * You are using a general entity extractor and the `RegexEntityExtractor`
  * AND you have regex patterns for entity type A
  * AND you have annotated text examples for entity type A
  
  Args:
      training_data: The training data for the NLU components.
docstr_tok: ["Warns","when","regex","entity","extractor","is","competing","with","a","general","one",".","This","might","be","the","case","when","the","following","conditions","are","all","met",":","*","You","are","using","a","general","entity","extractor","and","the","`","RegexEntityExtractor","`","*","AND","you","have","regex","patterns","for","entity","type","A","*","AND","you","have","annotated","text","examples","for","entity","type","A","Args",":","training_data",":","The","training","data","for","the","NLU","components","."]
code: def _warn_of_competition_with_regex_extractor(
      self, training_data: TrainingData
  ) -> None:
      """Warns when regex entity extractor is competing with a general one.
  
      This might be the case when the following conditions are all met:
      * You are using a general entity extractor and the `RegexEntityExtractor`
      * AND you have regex patterns for entity type A
      * AND you have annotated text examples for entity type A
  
      Args:
          training_data: The training data for the NLU components.
      """
      present_general_extractors = self._component_types.intersection(
          TRAINABLE_EXTRACTORS
      )
      has_general_extractors = len(present_general_extractors) > 0
      has_regex_extractor = (
          RegexEntityExtractor in self._component_types
      )
  
      regex_entity_types = {
          rf["name"] for rf in training_data.regex_features
      }
      overlap_between_types = training_data.entities.intersection(
          regex_entity_types
      )
      has_overlap = len(overlap_between_types) > 0
  
      if has_general_extractors and has_regex_extractor and has_overlap:
          rasa.shared.utils.io.raise_warning(
              f"You have an overlap between the "
              f"'{RegexEntityExtractor.__name__}' and the "
              f"statistical entity extractors "
              f"{_types_to_str(present_general_extractors)} "
              f"in your configuration. Specifically both types of extractors will "
              f"attempt to extract entities of the types "
              f"{', '.join(overlap_between_types)}. "
              f"This can lead to multiple "
              f"extraction of entities. Please read "
              f"'{RegexEntityExtractor.__name__}''s "
              f"documentation section to make sure you understand the "
              f"implications.",
              docs=f"{DOCS_URL_COMPONENTS}#regexentityextractor",
          )
  
imports: from __future__ import annotations
  from collections import defaultdict
  from typing import Iterable, List, Dict, Text, Any, Set, Type, cast
  from rasa.core.featurizers.precomputation import CoreFeaturizationInputConverter
  from rasa.engine.graph import ExecutionContext, GraphComponent, GraphSchema, SchemaNode
  from rasa.engine.storage.storage import ModelStorage
  from rasa.engine.storage.resource import Resource
  from rasa.nlu.featurizers.featurizer import Featurizer
  from rasa.nlu.extractors.mitie_entity_extractor import MitieEntityExtractor
  from rasa.nlu.extractors.regex_entity_extractor import RegexEntityExtractor
  from rasa.nlu.extractors.crf_entity_extractor import CRFEntityExtractor, CRFEntityExtractorOptions
  from rasa.nlu.extractors.entity_synonyms import EntitySynonymMapper
  from rasa.nlu.featurizers.sparse_featurizer.regex_featurizer import RegexFeaturizer
  from rasa.nlu.classifiers.diet_classifier import DIETClassifier
  from rasa.nlu.selectors.response_selector import ResponseSelector
  from rasa.nlu.tokenizers.tokenizer import Tokenizer
  from rasa.core.policies.rule_policy import RulePolicy
  from rasa.core.policies.policy import Policy, SupportedData
  from rasa.core.policies.memoization import MemoizationPolicy
  from rasa.core.policies.ted_policy import TEDPolicy
  from rasa.core.constants import POLICY_PRIORITY
  from rasa.shared.core.training_data.structures import RuleStep, StoryGraph
  from rasa.shared.constants import DEFAULT_CONFIG_PATH, DOCS_URL_COMPONENTS, DOCS_URL_DEFAULT_ACTIONS, DOCS_URL_POLICIES, DOCS_URL_RULES
  from rasa.shared.core.domain import Domain, InvalidDomain
  from rasa.shared.core.constants import ACTION_BACK_NAME, ACTION_RESTART_NAME, USER_INTENT_BACK, USER_INTENT_RESTART
  from rasa.shared.exceptions import InvalidConfigException
  from rasa.shared.importers.importer import TrainingDataImporter
  from rasa.shared.nlu.training_data.training_data import TrainingData
  import rasa.shared.utils.io
label_desc: Use image node_id 8 for calling the DefaultV1RecipeValidator obj's underlying member method code with example usage: obj._warn_of_competition_with_regex_extractor(training_data) without return types