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 _map_keyword_to_intent(self, text: Text) -> Optional[Text]:
      re_flag = 0 if self.case_sensitive else re.IGNORECASE
  
      for keyword, intent in self.intent_keyword_map.items():
          if re.search(r"\b" + keyword + r"\b", text, flags=re_flag):
              logger.debug(
                  f"KeywordClassifier matched keyword '{keyword}' to"
                  f" intent '{intent}'."
              )
              return intent
  
      logger.debug(
          "KeywordClassifier did not find any keywords in the message."
      )
      return None
  
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 7 for calling the KeywordIntentClassifier obj's underlying member method code with example usage: obj._map_keyword_to_intent(text) and returns: None, intent