code: def main():
      parser = argparse.ArgumentParser()
      parser.add_argument("-b", "--base_path", type=str, required=True)
      parser.add_argument(
          "-c", "--bertcrf_path", type=str, required=True
      )
      args = parser.parse_args()
  
      print("processing for bertcrf......")
  
      for fold in ["train", "dev", "test"]:
          print(os.path.join(args.base_path, fold + ".w1.oneie.json"))
          raw_data = open(
              os.path.join(args.base_path, fold + ".w1.oneie.json"), "r"
          ).readlines()
          processed_trigger = data_process(
              raw_data=raw_data, task="trigger", mode=fold
          )
          processed_role = data_process(
              raw_data=raw_data, task="role", mode=fold
          )
  
          trigger_path = os.path.join(args.bertcrf_path, "trigger")
          role_path = os.path.join(args.bertcrf_path, "role")
  
          if not os.path.exists(trigger_path):
              os.makedirs(trigger_path)
          if not os.path.exists(role_path):
              os.makedirs(role_path)
  
          write_by_lines(
              os.path.join(trigger_path, fold + ".tsv"),
              processed_trigger,
          )
          write_by_lines(
              os.path.join(role_path, fold + ".tsv"), processed_role
          )
  
      print("end processing for bertcrf......")
  
file_path: DeepKE/example/ee/standard/data/ACE/preprocess/preprocessing/process_bertcrf.py
imports: import argparse
  import json
  from collections import Counter, defaultdict
  import os, sys
  from tqdm import tqdm
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types