class_docstr: A Mitie Entity Extractor (which is a thin wrapper around `Dlib-ml`).
class_docstr_tok: ["A","Mitie","Entity","Extractor","(","which","is","a","thin","wrapper","around","`","Dlib-ml","`",")","."]
docstr: Extract entities of the given type from the given user message.
  
  Args:
      message: a user message
      mitie_model: MitieModel containing a `mitie.total_word_feature_extractor`
  
  Returns:
      a list of dictionaries describing the entities
docstr_tok: ["Extract","entities","of","the","given","type","from","the","given","user","message",".","Args",":","message",":","a","user","message","mitie_model",":","MitieModel","containing","a","`","mitie.total_word_feature_extractor","`","Returns",":","a","list","of","dictionaries","describing","the","entities"]
code: def _extract_entities(
      self, message: Message, mitie_model: MitieModel
  ) -> List[Dict[Text, Any]]:
      """Extract entities of the given type from the given user message.
  
      Args:
          message: a user message
          mitie_model: MitieModel containing a `mitie.total_word_feature_extractor`
  
      Returns:
          a list of dictionaries describing the entities
      """
      text = message.get(TEXT)
      tokens = message.get(TOKENS_NAMES[TEXT])
  
      entities = []
      token_texts = [token.text for token in tokens]
      if self._ner is None:
          mitie_entities = []
      else:
          mitie_entities = self._ner.extract_entities(
              token_texts, mitie_model.word_feature_extractor
          )
      for e in mitie_entities:
          if len(e[0]):
              start = tokens[e[0][0]].start
              end = tokens[e[0][-1]].end
  
              entities.append(
                  {
                      ENTITY_ATTRIBUTE_TYPE: e[1],
                      ENTITY_ATTRIBUTE_VALUE: text[start:end],
                      ENTITY_ATTRIBUTE_START: start,
                      ENTITY_ATTRIBUTE_END: end,
                      ENTITY_ATTRIBUTE_CONFIDENCE: None,
                  }
              )
      return entities
  
imports: from __future__ import annotations
  import logging
  from rasa.nlu.tokenizers.tokenizer import Tokenizer
  import typing
  from typing import Any, Dict, List, Optional, Text, Type
  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.nlu.constants import TOKENS_NAMES
  from rasa.shared.nlu.constants import ENTITY_ATTRIBUTE_CONFIDENCE, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_VALUE, TEXT, ENTITIES
  from rasa.nlu.utils.mitie_utils import MitieModel, MitieNLP
  from rasa.nlu.extractors.extractor import EntityExtractorMixin
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  import rasa.shared.utils.io
  from rasa.shared.exceptions import InvalidConfigException
label_desc: Use image node_id 10 for calling the MitieEntityExtractor obj's underlying member method code with example usage: obj._extract_entities(message, mitie_model) and returns: entities