<commit_before>package com.github.TKnudsen.ComplexDataObject.data.attributes;

import com.github.TKnudsen.ComplexDataObject.data.complexDataObject.ComplexDataObject;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.collections4.CollectionUtils;

/**
 * <p>
 * Title: AttributeValueDistribution
 * </p>
 * 
 * <p>
 * Description: stores the value distribution of an attribute AND the
 * priorization of external entities w.r.t. attributes.
 * 
 * Example: Distribution of horse power (attribute) of cars. Two different
 * scoring functions A and B have different priorizations of horse power, e.g.,
 * A: 100PS, B: 200PS.
 * </p>
 * 
 * <p>
 * Copyright: Copyright (c) 2018
 * </p>
 * 
 * @author <NAME>
 * @version 1.02
 */
public class AttributeValueDistribution<T> extends ComplexDataObject implements Comparable<T> {

	private Map<String, Double> priorizations = new HashMap<>();

	private Collection<T> valueDistribution;

	private Class<T> valueType;

	private String attributeName;

	@SuppressWarnings("unused") // only for serialization purposes
	public AttributeValueDistribution() {
		super();
	}

	public AttributeValueDistribution(String attributeName, Class<T> valueType, Collection<T> valueDistribution) {
		if (!CollectionUtils.isNotEmpty(valueDistribution))
			throw new IllegalArgumentException(getName() + ": value distribution must not be null or empty.");

		this.attributeName = attributeName;<commit_msg>protected<commit_after>package com.github.TKnudsen.ComplexDataObject.data.attributes;

import com.github.TKnudsen.ComplexDataObject.data.complexDataObject.ComplexDataObject;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.collections4.CollectionUtils;

/**
 * <p>
 * Title: AttributeValueDistribution
 * </p>
 * 
 * <p>
 * Description: stores the value distribution of an attribute AND the
 * priorization of external entities w.r.t. attributes.
 * 
 * Example: Distribution of horse power (attribute) of cars. Two different
 * scoring functions A and B have different priorizations of horse power, e.g.,
 * A: 100PS, B: 200PS.
 * </p>
 * 
 * <p>
 * Copyright: Copyright (c) 2018
 * </p>
 * 
 * @author <NAME>
 * @version 1.02
 */
public class AttributeValueDistribution<T> extends ComplexDataObject implements Comparable<T> {

	private Map<String, Double> priorizations = new HashMap<>();

	private Collection<T> valueDistribution;

	private Class<T> valueType;

	private String attributeName;

	protected AttributeValueDistribution() {
		super();
	}

	public AttributeValueDistribution(String attributeName, Class<T> valueType, Collection<T> valueDistribution) {
		if (!CollectionUtils.isNotEmpty(valueDistribution))
			throw new IllegalArgumentException(getName() + ": value distribution must not be null or empty.");

		this.attributeName = attributeName;
{'fraction_non_alphanumeric': 0.10666206420434933, 'fraction_numerical': 0.009665170866413532, 'mean_word_length': 5.062761506276151, 'pattern_counts': {'":': 2, '<': 33, '<?xml version=': 0, '>': 33, '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': '4050127', 'n_tokens_mistral': 865, 'n_tokens_neox': 794, 'n_words': 238}