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","."]
docstr: Sets the message intent and add it to the output if it exists.
docstr_tok: ["Sets","the","message","intent","and","add","it","to","the","output","if","it","exists","."]
code: def process(self, messages: List[Message]) -> List[Message]:
      """Sets the message intent and add it to the output if it exists."""
      for message in messages:
          intent_name = self._map_keyword_to_intent(message.get(TEXT))
  
          confidence = 0.0 if intent_name is None else 1.0
          intent = {
              INTENT_NAME_KEY: intent_name,
              PREDICTED_CONFIDENCE_KEY: confidence,
          }
  
          if message.get(INTENT) is None or intent_name is not None:
              message.set(INTENT, intent, add_to_output=True)
  
      return messages
  
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 6 for calling the KeywordIntentClassifier obj's underlying member method code with example usage: obj.process(messages) and returns: messages