// Path: src/utils/Hash.java
// public class Hash {
// 	/*
// 	 * comment from C&C: shift value to multiply by with each additional
// 	 * component of the hash function; this number is normally selected to be
// 	 * a smallish prime; 31 and 37 seem to work well
// 	 */
// 	private final static long INC = 92821;
// 	private long hash;
// 
// 	public Hash(Hash other) {
// 		hash = other.value();
// 	}
// 
// 	public Hash(long hash) {
// 		this.hash = hash;
// 	}
// 
// 	public Hash(byte hash) {
// 		this.hash = (hash);
// 	}
// 
// 	public long value() {
// 		return hash;
// 	}
// 
// 	public void plusEqual(long value) {
// 		// += in the C&C code
// 		hash *= INC;
// 		hash += value;
// 	}
// 
// 	public void barEqual(long value) {
// 		// |= in the C&C code
// 		hash += value;
// 	}
// 
// 	public void timesEqual(long value) {
// 		// *= in the C&C code
// 		hash *= value;
// 	}
// }


import utils.Hash;
package cat_combination;


// used by the oracle decoder and IgnoreDepsEval class which stores
// which dependencies are ignored by the evaluate script; we have to
// store heads and fillers as strings, not sentence indices

public class DependencyStringWords implements Comparable<DependencyStringWords> {
	private final short relID;
	private final String head;
	private final String filler;
	private final short unaryRuleID;

	public DependencyStringWords(short relID, String head, String filler, short unaryRuleID) {
		this.relID = relID;
		this.head = head;
		this.filler = filler;
		this.unaryRuleID = unaryRuleID;
	}

	@Override
	public int compareTo(DependencyStringWords other) {
		int compare;
		if ( (compare = Short.compare(this.relID, other.relID)) != 0 ) { return compare; }
		if ( (compare = this.head.compareTo(other.head)) != 0 ) { return compare; }
		if ( (compare = this.filler.compareTo(other.filler)) != 0 ) { return compare; }
		if ( (compare = Short.compare(this.unaryRuleID, other.unaryRuleID)) != 0 ) { return compare; }

		return 0;
	}

	@Override
	public int hashCode() {
// Path: src/utils/Hash.java
// public class Hash {
// 	/*
// 	 * comment from C&C: shift value to multiply by with each additional
// 	 * component of the hash function; this number is normally selected to be
// 	 * a smallish prime; 31 and 37 seem to work well
// 	 */
// 	private final static long INC = 92821;
// 	private long hash;
// 
// 	public Hash(Hash other) {
// 		hash = other.value();
// 	}
// 
// 	public Hash(long hash) {
// 		this.hash = hash;
// 	}
// 
// 	public Hash(byte hash) {
// 		this.hash = (hash);
// 	}
// 
// 	public long value() {
// 		return hash;
// 	}
// 
// 	public void plusEqual(long value) {
// 		// += in the C&C code
// 		hash *= INC;
// 		hash += value;
// 	}
// 
// 	public void barEqual(long value) {
// 		// |= in the C&C code
// 		hash += value;
// 	}
// 
// 	public void timesEqual(long value) {
// 		// *= in the C&C code
// 		hash *= value;
// 	}
// }


// Path: src/cat_combination/DependencyStringWords.java
import utils.Hash;

package cat_combination;


// used by the oracle decoder and IgnoreDepsEval class which stores
// which dependencies are ignored by the evaluate script; we have to
// store heads and fillers as strings, not sentence indices

public class DependencyStringWords implements Comparable<DependencyStringWords> {
	private final short relID;
	private final String head;
	private final String filler;
	private final short unaryRuleID;

	public DependencyStringWords(short relID, String head, String filler, short unaryRuleID) {
		this.relID = relID;
		this.head = head;
		this.filler = filler;
		this.unaryRuleID = unaryRuleID;
	}

	@Override
	public int compareTo(DependencyStringWords other) {
		int compare;
		if ( (compare = Short.compare(this.relID, other.relID)) != 0 ) { return compare; }
		if ( (compare = this.head.compareTo(other.head)) != 0 ) { return compare; }
		if ( (compare = this.filler.compareTo(other.filler)) != 0 ) { return compare; }
		if ( (compare = Short.compare(this.unaryRuleID, other.unaryRuleID)) != 0 ) { return compare; }

		return 0;
	}

	@Override
	public int hashCode() {
		Hash h = new Hash(relID);