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","."]
code: def _check_is_single_entity(
      text: Text,
      token: Token,
      last_token_end: int,
      split_entities_config: Dict[Text, bool],
      current_entity_tag: Text,
  ) -> bool:
      # current token has the same entity tag as the token before and
      # the two tokens are only separated by at most one symbol (e.g. space,
      # dash, etc.)
      if token.start - last_token_end <= 1:
          return True
  
      # Tokens need to be no further than 3 positions apart
      # The magic number 3 is chosen such that the following two cases can be
      # extracted
      #   - Schönhauser Allee 175, 10119 Berlin
      #     (address compounds separated by 2 tokens (", "))
      #   - 22 Powderhall Rd., EH7 4GB
      #     (abbreviated "Rd." results in a separation of 3 tokens ("., "))
      # More than 3 might already introduce cases that shouldn't be considered by
      # this logic
      tokens_within_range = token.start - last_token_end <= 3
  
      # The interleaving tokens *must* be a full stop, a comma, or a whitespace
      interleaving_text = text[last_token_end : token.start]
      tokens_separated_by_allowed_chars = all(
          filter(
              lambda char: True
              if char in SINGLE_ENTITY_ALLOWED_INTERLEAVING_CHARSET
              else False,
              interleaving_text,
          )
      )
  
      # The current entity type must match with the config (default value is True)
      default_value = split_entities_config[SPLIT_ENTITIES_BY_COMMA]
      split_current_entity_type = split_entities_config.get(
          current_entity_tag, default_value
      )
  
      return (
          tokens_within_range
          and tokens_separated_by_allowed_chars
          and not split_current_entity_type
      )
  
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 9 for calling the EntityExtractorMixin obj's underlying member method code with example usage: obj._check_is_single_entity(text, token, last_token_end, split_entities_config, current_entity_tag) and returns: unknown, True