class_docstr: Clean examples according to rules
docstr: Get clean settings correspond to corpus in `opts`.
docstr_tok: ["Get","clean","settings","correspond","to","corpus","in","`","opts","`","."]
code: def get_opt_dict(cls, opts, opt, def_val):
      """Get clean settings correspond to corpus in `opts`."""
      clean_dict = {}
      # normalize dict src/tgt for each dataset
      if hasattr(opts, "data"):
          for c_name, corpus in opts.data.items():
              clean = cls._get_opt(corpus, opt, def_val)
              if clean is not None:
                  logger.debug(f"Get {opt} for {c_name}: {clean}")
                  clean_dict[c_name] = clean
  
      return clean_dict
  
file_path: OpenNMT-py/onmt/transforms/clean.py
imports: from onmt.transforms import register_transform
  from .transform import Transform
  from onmt.utils.logging import logger
  import fasttext
  import os
  import urllib.request
  import regex
label_desc: Use image node_id 5 for calling the CleanTransform obj's underlying member method code with example usage: obj.get_opt_dict(cls, opts, opt, def_val) and returns: clean_dict