code: def process_label(line, is_start=False):
      """
      Converts our stuff to conll labels
  
      event, product, work of art, norp -> MISC
      take out dates - can use Stanza to identify them as dates and eliminate them
      money requires some special care
      facility -> location  (there are examples of Bridge and Hospital in the data)
      the version of conll we used to train CoreNLP NER is here:
  
      Overall plan:
      Collapse Product, NORP, Money (extract only the symbols), into misc.
      Collapse Facilities into LOC
      Deletes Dates
  
      Rule for currency is that we take out labels for the numbers that return True for isfloat()
      Take out words that categorize money (Million, Billion, Trillion, Thousand, Hundred, Ten, Nine, Eight, Seven, Six, Five,
      Four, Three, Two, One)
      Take out punctuation characters
  
      If we remove the 'B' tag, then move it to the first remaining tag.
  
      Replace tags with 'O'
      is_start parameter signals whether or not this current line is the new start of a tag. Needed for when
      the previous line analyzed is the start of a MONEY tag but is removed because it is a non symbol- need to
      set the starting token that is a symbol to the B-MONEY tag when it might have previously been I-MONEY
      """
      if not line:
          return []
      token = line[0]
      biggest_label = line[1]
      position, label_name = biggest_label[:2], biggest_label[2:]
  
      if label_name == "Money":
          if (
              token.lower() in MONEY_WORDS
              or token in PUNCTUATION
              or isfloat(token)
          ):  # remove this tag
              label_name = "O"
              is_start = True
              position = ""
          else:  # keep money tag
              label_name = "MISC"
              if is_start:
                  position = "B-"
                  is_start = False
  
      elif not label_name or label_name == "O":
          pass
      elif label_name in LABEL_TRANSLATION:
          label_name = LABEL_TRANSLATION[label_name]
          if label_name is None:
              position = ""
              label_name = "O"
              is_start = False
      else:
          raise ValueError("Oops, missed a label: %s" % label_name)
      return [token, position + label_name, is_start]
  
file_path: stanza/stanza/utils/datasets/ner/simplify_en_worldwide.py
imports: import argparse
  import os
  import tempfile
  import stanza
  from stanza.utils.default_paths import get_default_paths
  from stanza.utils.datasets.ner.utils import read_tsv
  from stanza.utils.get_tqdm import get_tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: process_label(line, is_start) and returns: list, list