<commit_before>package de.lmu.ifi.dbs.distance.distancefunction;

import de.lmu.ifi.dbs.data.DatabaseObject;
import de.lmu.ifi.dbs.database.AssociationID;
import de.lmu.ifi.dbs.database.Database;
import de.lmu.ifi.dbs.database.DatabaseEvent;
import de.lmu.ifi.dbs.database.DatabaseListener;
import de.lmu.ifi.dbs.preprocessing.Preprocessor;
import de.lmu.ifi.dbs.utilities.UnableToComplyException;
import de.lmu.ifi.dbs.utilities.Util;
import de.lmu.ifi.dbs.utilities.optionhandling.*;

import java.util.List;

/**
 * Handler class for all distance function using a preprocessor.
 *
 * @author <NAME> (<a href="mailto:<EMAIL>"><EMAIL></a>)
 */
public class PreprocessorHandler<O extends DatabaseObject,P extends Preprocessor<O>> implements DatabaseListener {

  /**
   * Parameter for preprocessor.
   */
  public static final String PREPROCESSOR_CLASS_P = "preprocessor";

  /**
   * Flag for omission of preprocessing.
   */
  public static final String OMIT_PREPROCESSING_F = "omitPreprocessing";

  /**
   * Description for flag for force of preprocessing.
   */
  public static final String OMIT_PREPROCESSING_D = "flag to omit (a new) preprocessing if for each object a matrix already has been associated.";

  /**
   * True, if preprocessing is omitted, false otherwise.
   */
  private boolean omit;

  /**
   * The preprocessor to run the variance analysis of the objects.
   */
  private P preprocessor;

  /**
   * The assocoiation ID for the association to be set by the preprocessor
   */
  private AssociationID associationID;

  /**
   * The super class for the preprocessor class.
   */
  private Class preprocessorSuperClassName;

  /**
   * The description for the preprocessor class.
   */
  private String preprocessorClassDescription;

  /**<commit_msg>TODO note<commit_after>package de.lmu.ifi.dbs.distance.distancefunction;

import de.lmu.ifi.dbs.data.DatabaseObject;
import de.lmu.ifi.dbs.database.AssociationID;
import de.lmu.ifi.dbs.database.Database;
import de.lmu.ifi.dbs.database.DatabaseEvent;
import de.lmu.ifi.dbs.database.DatabaseListener;
import de.lmu.ifi.dbs.preprocessing.Preprocessor;
import de.lmu.ifi.dbs.utilities.UnableToComplyException;
import de.lmu.ifi.dbs.utilities.Util;
import de.lmu.ifi.dbs.utilities.optionhandling.*;

import java.util.List;

/**
 * Handler class for all distance function using a preprocessor.
 *
 * @author <NAME> (<a href="mailto:<EMAIL>"><EMAIL></a>)
 */
public class PreprocessorHandler<O extends DatabaseObject,P extends Preprocessor<O>> implements DatabaseListener {

  /**
   * Parameter for preprocessor.
   */
  public static final String PREPROCESSOR_CLASS_P = "preprocessor";

  /**
   * Flag for omission of preprocessing.
   */
  public static final String OMIT_PREPROCESSING_F = "omitPreprocessing";

  /**
   * Description for flag for force of preprocessing.
   * TODO: description: matrix?
   */
  public static final String OMIT_PREPROCESSING_D = "flag to omit (a new) preprocessing if for each object a matrix already has been associated.";

  /**
   * True, if preprocessing is omitted, false otherwise.
   */
  private boolean omit;

  /**
   * The preprocessor to run the variance analysis of the objects.
   */
  private P preprocessor;

  /**
   * The assocoiation ID for the association to be set by the preprocessor
   */
  private AssociationID associationID;

  /**
   * The super class for the preprocessor class.
   */
  private Class preprocessorSuperClassName;

  /**
   * The description for the preprocessor class.
   */
  private String preprocessorClassDescription;

  /**
{'fraction_non_alphanumeric': 0.10234899328859061, 'fraction_numerical': 0.0, 'mean_word_length': 3.879945429740791, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2144447', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1063, 'n_words': 302}