class_docstr: A utility class for RegexpTagger to hold all tokens for a given Sentence and define some functionality.
  
  Args:
      sentence: A Sentence object
class_docstr_tok: ["A","utility","class","for","RegexpTagger","to","hold","all","tokens","for","a","given","Sentence","and","define","some","functionality",".","Args",":","sentence",":","A","Sentence","object"]
docstr: Find a span by the token character positions.
  
  Given an interval specified with start and end pos as tuple, this function returns a Span object
  spanning the tokens included in the interval. If the interval is overlapping with a token span, a
  ValueError is raised
  
  Args:
      span: Start and end pos of the requested span as tuple
  
  Returns: A span object spanning the requested token interval
docstr_tok: ["Find","a","span","by","the","token","character","positions",".","Given","an","interval","specified","with","start","and","end","pos","as","tuple",",","this","function","returns","a","Span","object","spanning","the","tokens","included","in","the","interval",".","If","the","interval","is","overlapping","with","a","token","span",",","a","ValueError","is","raised","Args",":","span",":","Start","and","end","pos","of","the","requested","span","as","tuple","Returns",":","A","span","object","spanning","the","requested","token","interval"]
code: def get_token_span(self, span: Tuple[int, int]) -> Span:
      """Find a span by the token character positions.
  
      Given an interval specified with start and end pos as tuple, this function returns a Span object
      spanning the tokens included in the interval. If the interval is overlapping with a token span, a
      ValueError is raised
  
      Args:
          span: Start and end pos of the requested span as tuple
  
      Returns: A span object spanning the requested token interval
      """
      span_start: int = self.__tokens_start_pos.index(span[0])
      span_end: int = self.__tokens_end_pos.index(span[1])
      return Span(self.tokens[span_start : span_end + 1])
  
file_path: flair/flair/models/regexp_tagger.py
imports: import re
  import typing
  from dataclasses import dataclass, field
  from typing import Dict, List, Tuple, Union
  from flair.data import Sentence, Span, Token
label_desc: Use image node_id 3 for calling the TokenCollection obj's underlying member method code with example usage: obj.get_token_span(span) and returns: Span