code: def standardize_token_rule():
      base_norm_dict = {}
      rules_df = pd.read_excel(TOKEN_RULE_FILE, engine="openpyxl")
      for key, item in rules_df.iterrows():
          word = item[0]
          normalize = item[1]
          base_norm_dict[word] = normalize
  
      base_norm_data = []
      for key in base_norm_dict:
          word = AnalysableWord(base_norm_dict[key])
          base_norm_data.append(
              {
                  "word": key,
                  "normalize": base_norm_dict[key],
                  "group": word.group,
              }
          )
      dict_df = pd.DataFrame(base_norm_data)
      dict_df = dict_df.sort_values(by=["group", "normalize", "word"])
      dict_df.to_excel(TOKEN_RULE_FILE, index=False)
  
file_path: underthesea/examples/text_normalize/build_rules.py
imports: from os.path import join, dirname
  import joblib
  from datetime import datetime
  import pandas
  from normalize import AnalysableWord
label_desc: Use image node_id 1 for calling a global function with example usage: standardize_token_rule() without return types