code: def fix_bg_typos(text, raw_filename):
      typo_pairs = {
          # training_pl_cs_ru_bg_rc1/raw/bg/brexit_bg.txt_file_202.txt is not exactly a typo, but the word is mixed cyrillic and ascii characters
          "brexit_bg.txt_file_202.txt": ("Вlооmbеrg", "Bloomberg"),
          # training_pl_cs_ru_bg_rc1/raw/bg/brexit_bg.txt_file_261.txt has a typo: Telegaph instead of Telegraph
          "brexit_bg.txt_file_261.txt": ("Telegaph", "Telegraph"),
          # training_pl_cs_ru_bg_rc1/raw/bg/brexit_bg.txt_file_574.txt has a typo: politicalskrapbook instead of politicalscrapbook
          "brexit_bg.txt_file_574.txt": (
              "politicalskrapbook",
              "politicalscrapbook",
          ),
          # training_pl_cs_ru_bg_rc1/raw/bg/brexit_bg.txt_file_861.txt has a mix of cyrillic and ascii
          "brexit_bg.txt_file_861.txt": (
              "Съвета „Общи въпроси“",
              'Съветa "Общи въпроси"',
          ),
          # training_pl_cs_ru_bg_rc1/raw/bg/brexit_bg.txt_file_992.txt is not exactly a typo, but the word is mixed cyrillic and ascii characters
          "brexit_bg.txt_file_992.txt": (
              "The Guardiаn",
              "The Guardian",
          ),
          # training_pl_cs_ru_bg_rc1/raw/bg/brexit_bg.txt_file_1856.txt has a typo: Southerb instead of Southern
          "brexit_bg.txt_file_1856.txt": ("Southerb", "Southern"),
      }
  
      filename = os.path.split(raw_filename)[1]
      if filename in typo_pairs:
          replacement = typo_pairs.get(filename)
          text = text.replace(replacement[0], replacement[1])
  
      return text
  
file_path: stanza/stanza/utils/datasets/ner/convert_bsnlp.py
imports: import argparse
  import glob
  import os
  import logging
  import random
  import re
  import stanza
label_desc: Use image node_id 2 for calling a global function with example usage: fix_bg_typos(text, raw_filename) and returns: text