<commit_before>package org.cocolab.inpro.dialogmanagement.composer;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * Class representing an AVM with methods for equality, unification and setting
 * attributes.
 * @author okko
 */
public class AVM {

	// Implementing classes must define these in their constructors.
	public String type;
	public HashMap<String, Object> attributes;
//	public ArrayList<String> attributes;
//	public HashMap<String, String> stringAttributes;
//	public HashMap<String, AVM> AVMAttributes;
//	public HashMap<String, ArrayList<AVM>> listAttributes;
//	public HashMap<String, ArrayList<AVM>> fixedListAttributes;

	/**
	 * Empty constructor.
	 */
	AVM() {}

	/**
	 * String type constructor.
	 */
	AVM(String type) {
		this.type = type;
		this.setEmptyAttributesFromType(this.type);
	}

	/**
	 * Copy constructor.
	 * @param avm - the AVM to copy.
	 */
	protected AVM (AVM avm) {
		this.type = new String(avm.type);
		this.attributes = new HashMap<String, Object>(avm.attributes);
	}

	private void setEmptyAttributesFromType(String type) {
//		System.err.println("new " + type + " avm");<commit_msg>Removed typed AVM sources, cleaned up a bit AVM.java<commit_after>package org.cocolab.inpro.dialogmanagement.composer;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * Class representing an AVM with methods for equality, unification and setting
 * attributes.
 * @author okko
 */
public class AVM {

	// Implementing classes must define these in their constructors.
	public String type;
	public HashMap<String, Object> attributes;

	/**
	 * Empty constructor.
	 */
	AVM() {}

	/**
	 * String type constructor.
	 */
	AVM(String type) {
		this.type = type;
		this.setEmptyAttributesFromType(this.type);
	}

	/**
	 * Copy constructor.
	 * @param avm - the AVM to copy.
	 */
	protected AVM (AVM avm) {
		this.type = new String(avm.type);
		this.attributes = new HashMap<String, Object>(avm.attributes);
	}

	private void setEmptyAttributesFromType(String type) {
{'fraction_non_alphanumeric': 0.12027833001988071, 'fraction_numerical': 0.0, 'mean_word_length': 3.945945945945946, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '4040641', 'n_tokens_mistral': 648, 'n_tokens_neox': 617, 'n_words': 173}