code: def _build_text_filter(self):
          
          text_filter = TextFilter(logger=self.logger)
          self.log(u"Created TextFilter object")
          for key, cls, param_name in [
                  (
                      gc.PPN_TASK_IS_TEXT_FILE_IGNORE_REGEX,
                      TextFilterIgnoreRegex,
                      "regex"
                  ),
                  (
                      gc.PPN_TASK_IS_TEXT_FILE_TRANSLITERATE_MAP,
                      TextFilterTransliterate,
                      "map_file_path"
                  )
          ]:
              cls_name = cls.__name__
              param_value = gf.safe_get(self.parameters, key, None)
              if param_value is not None:
                  self.log([u"Creating %s object...", cls_name])
                  params = {
                      param_name: param_value,
                      "logger": self.logger
                  }
                  try:
                      inner_filter = cls(**params)
                      text_filter.add_filter(inner_filter)
                      self.log([u"Creating %s object... done", cls_name])
                  except ValueError as exc:
                      self.log_exc(u"Creating %s object failed" % (cls_name), exc, False, None)
          return text_filter
docs: Build a suitable TextFilter object.