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: Loads trained component (see parent class for full docstring).
docstr_tok: ["Loads","trained","component","(","see","parent","class","for","full","docstring",")","."]
code: def load(
      cls,
      config: Dict[Text, Any],
      model_storage: ModelStorage,
      resource: Resource,
      execution_context: ExecutionContext,
      **kwargs: Any,
  ) -> MitieEntityExtractor:
      """Loads trained component (see parent class for full docstring)."""
      import mitie
  
      try:
          with model_storage.read_from(resource) as model_path:
              ner_file = model_path / cls.MITIE_RESOURCE_FILE
              if not ner_file.exists():
                  raise FileNotFoundError(
                      f"Expected a MITIE extractor file at {ner_file}."
                  )
              ner = mitie.named_entity_extractor(str(ner_file))
              return cls(config, model_storage, resource, ner=ner)
  
      except (FileNotFoundError, ValueError) as e:
          logger.debug(
              f"Failed to load {cls.__name__} from model storage. "
              f"This can happen if the model could not be trained because regexes "
              f"could not be extracted from the given training data - and hence "
              f"could not be persisted. Error: {e}."
          )
          return cls(config, model_storage, resource)
  
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 11 for calling the MitieEntityExtractor obj's underlying member method code with example usage: obj.load(cls, config, model_storage, resource, execution_context) and returns: cls, cls