class_docstr: Provides functionality for components that do entity extraction.
  
  Inheriting from this class will add utility functions for entity extraction.
  Entity extraction is the process of identifying and extracting entities like a
  person's name, or a location from a message.
class_docstr_tok: ["Provides","functionality","for","components","that","do","entity","extraction",".","Inheriting","from","this","class","will","add","utility","functions","for","entity","extraction",".","Entity","extraction","is","the","process","of","identifying","and","extracting","entities","like","a","person","'s","name",",","or","a","location","from","a","message","."]
docstr: Filters out untrainable entity annotations.
  
  Creates a copy of entity_examples in which entities that have
  `extractor` set to something other than
  self.name (e.g. 'CRFEntityExtractor') are removed.
docstr_tok: ["Filters","out","untrainable","entity","annotations",".","Creates","a","copy","of","entity_examples","in","which","entities","that","have","`","extractor","`","set","to","something","other","than","self.name","(","e.g",".","'CRFEntityExtractor","'",")","are","removed","."]
code: def filter_trainable_entities(
      self, entity_examples: List[Message]
  ) -> List[Message]:
      """Filters out untrainable entity annotations.
  
      Creates a copy of entity_examples in which entities that have
      `extractor` set to something other than
      self.name (e.g. 'CRFEntityExtractor') are removed.
      """
      filtered = []
      for message in entity_examples:
          entities = []
          for ent in message.get(ENTITIES, []):
              extractor = ent.get(EXTRACTOR)
              if not extractor or extractor == self.name:
                  entities.append(ent)
          data = message.data.copy()
          data[ENTITIES] = entities
          filtered.append(
              Message(
                  text=message.get(TEXT),
                  data=data,
                  output_properties=message.output_properties,
                  time=message.time,
                  features=message.features,
              )
          )
  
      return filtered
  
imports: import abc
  from typing import Any, Dict, List, NamedTuple, Text, Tuple, Optional
  import rasa.shared.utils.io
  from rasa.shared.constants import DOCS_URL_TRAINING_DATA_NLU
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  from rasa.nlu.tokenizers.tokenizer import Token
  from rasa.nlu.constants import TOKENS_NAMES, ENTITY_ATTRIBUTE_CONFIDENCE_TYPE, ENTITY_ATTRIBUTE_CONFIDENCE_ROLE, ENTITY_ATTRIBUTE_CONFIDENCE_GROUP
  from rasa.shared.nlu.constants import TEXT, INTENT, ENTITIES, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, EXTRACTOR, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE, NO_ENTITY_TAG, SPLIT_ENTITIES_BY_COMMA, SINGLE_ENTITY_ALLOWED_INTERLEAVING_CHARSET
  import rasa.utils.train_utils
label_desc: Use image node_id 6 for calling the EntityExtractorMixin obj's underlying member method code with example usage: obj.filter_trainable_entities(entity_examples) and returns: filtered