code: def start_of_chunk(prev_tag, tag, prev_type, type_):
      """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.
      """
      chunk_start = False
  
      end_tag = ("L", "E")
      start_tag = ("U", "S")
  
      if tag == "B":
          chunk_start = True
      if tag in start_tag:
          chunk_start = True
  
      if prev_tag in end_tag and tag in end_tag:
          chunk_start = True
      if prev_tag in end_tag and tag == "I":
          chunk_start = True
      if prev_tag in start_tag and tag in end_tag:
          chunk_start = True
      if prev_tag in start_tag and tag == "I":
          chunk_start = True
      if prev_tag == "O" and tag in end_tag:
          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
  
file_path: nlp-architect/nlp_architect/utils/metrics.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from scipy.stats import pearsonr, spearmanr
  from sklearn.metrics import f1_score
  from collections import defaultdict
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: start_of_chunk(prev_tag, tag, prev_type, type_) and returns: chunk_start