class_docstr: Intent classifier using simple keyword matching.
  
  The classifier takes a list of keywords and associated intents as an input.
  An input sentence is checked for the keywords and the intent is returned.
class_docstr_tok: ["Intent","classifier","using","simple","keyword","matching",".","The","classifier","takes","a","list","of","keywords","and","associated","intents","as","an","input",".","An","input","sentence","is","checked","for","the","keywords","and","the","intent","is","returned","."]
code: def _validate_keyword_map(self) -> None:
      re_flag = 0 if self.case_sensitive else re.IGNORECASE
  
      ambiguous_mappings = []
      for keyword1, intent1 in self.intent_keyword_map.items():
          for keyword2, intent2 in self.intent_keyword_map.items():
              if (
                  re.search(
                      r"\b" + keyword1 + r"\b", keyword2, flags=re_flag
                  )
                  and intent1 != intent2
              ):
                  ambiguous_mappings.append((intent1, keyword1))
                  rasa.shared.utils.io.raise_warning(
                      f"Keyword '{keyword1}' is a keyword of intent '{intent1}', "
                      f"but also a substring of '{keyword2}', which is a "
                      f"keyword of intent '{intent2}."
                      f" '{keyword1}' will be removed from the list of keywords.\n"
                      f"Remove (one of) the conflicting keywords from the"
                      f" training data.",
                      docs=DOCS_URL_COMPONENTS
                      + "#keyword-intent-classifier",
                  )
      for intent, keyword in ambiguous_mappings:
          self.intent_keyword_map.pop(keyword)
          logger.debug(
              f"Removed keyword '{keyword}' from intent "
              f"'{intent}' because it matched a "
              f"keyword of another intent."
          )
  
imports: from __future__ import annotations
  import logging
  import re
  from typing import Any, Dict, Optional, Text, List
  from rasa.engine.graph import GraphComponent, ExecutionContext
  from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  from rasa.engine.storage.resource import Resource
  from rasa.engine.storage.storage import ModelStorage
  from rasa.shared.constants import DOCS_URL_COMPONENTS
  from rasa.nlu.classifiers.classifier import IntentClassifier
  from rasa.shared.nlu.constants import INTENT, TEXT, INTENT_NAME_KEY, PREDICTED_CONFIDENCE_KEY
  import rasa.shared.utils.io
  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 5 for calling the KeywordIntentClassifier obj's underlying member method code with example usage: obj._validate_keyword_map() without return types