code: def start_of_chunk(prev_tag, tag, prev_type, type_):
      
      chunk_start = False
  
      if tag == 'B': chunk_start = True
      if tag == 'S': chunk_start = True
  
      if prev_tag == 'E' and tag == 'E': chunk_start = True
      if prev_tag == 'E' and tag == 'I': chunk_start = True
      if prev_tag == 'S' and tag == 'E': chunk_start = True
      if prev_tag == 'S' and tag == 'I': chunk_start = True
      if prev_tag == 'O' and tag == 'E': chunk_start = True
      if prev_tag == 'O' and tag == 'I': chunk_start = True
  
      if tag != 'O' and tag != '.' and prev_type != type_:
          chunk_start = True
  
      return chunk_start
docs: Checks if a chunk started between the previous and current word.
  
      Args:
          prev_tag: previous chunk tag.
          tag: current chunk tag.
          prev_type: previous type.
          type_: current type.
  
      Returns:
          chunk_start: boolean.