class_docstr: Normalize source and target based on Moses script.
class_docstr_tok: ["Normalize","source","and","target","based","on","Moses","script","."]
docstr: Get normalize settings correspond to corpus in `opts`.
docstr_tok: ["Get","normalize","settings","correspond","to","corpus","in","`","opts","`","."]
code: def get_opt_dict(cls, opts, opt, def_val):
      """Get normalize settings correspond to corpus in `opts`."""
      normalize_dict = {}
      # normalize dict src/tgt for each dataset
      if hasattr(opts, "data"):
          for c_name, corpus in opts.data.items():
              normalize = cls._get_opt(corpus, opt, def_val)
              if normalize is not None:
                  logger.debug(f"Get {opt} for {c_name}: {normalize}")
                  normalize_dict[c_name] = normalize
  
      return normalize_dict
  
imports: from onmt.utils.logging import logger
  import re
  import regex
  from itertools import chain
  from onmt.transforms import register_transform
  from .transform import Transform
label_desc: Use image node_id 5 for calling the NormalizeTransform obj's underlying member method code with example usage: obj.get_opt_dict(cls, opts, opt, def_val) and returns: normalize_dict