package lexicon;

/*
 * a triple consisting of: markedup category string, relation slot number,
 * and relation slot number according to Julia's ordering in CCGbank, which
 * is different and required for evaluating against CCGbank
 */

public class Relation {
	public final String category;
	public final short slot;
	public final short jslot;

	public Relation(String category, short slot, short jslot) {
		this.category = category;
		this.slot = slot;
		this.jslot = jslot;
	}

	public Relation(Relation other) {
		category = other.category;
		slot = other.slot;
		jslot = other.jslot;
	}

	public void printSlot(boolean juliaSlots) {
		if (juliaSlots) {
			System.out.print(category + " " + Short.toString(jslot));
		} else {
			System.out.print(category + " " + Short.toString(slot));
		}
	}
}

@@ -637,16 +637,17 @@
 %7B%0A%09%09if (
+ 
 juliaSlo
@@ -644,24 +644,25 @@
 ( juliaSlots
+ 
 ) %7B%0A%09%09%09Syste
@@ -694,30 +694,14 @@
 %22 + 
-Short.toString(
 jslot)
-)
 ;%0A%09%09
@@ -750,29 +750,13 @@
 %22 + 
-Short.toString(
 slot)
-)
 ;%0A%09%09

Refactor Relation