diff --git a/src/edu/jhu/thrax/hadoop/features/mapred/SourceCountFeature.java b/src/edu/jhu/thrax/hadoop/features/mapred/SourceCountFeature.java index 2c19619..5f8f428 100644 --- a/src/edu/jhu/thrax/hadoop/features/mapred/SourceCountFeature.java +++ b/src/edu/jhu/thrax/hadoop/features/mapred/SourceCountFeature.java @@ -25,15 +25,10 @@ public class SourceCountFeature extends MapReduceFeature { public static final String NAME = "f_count"; - public static final String LABEL = "C(f)"; public String getName() { return NAME; } - - public String getLabel() { - return LABEL; - } public Class sortComparatorClass() { return Comparator.class; @@ -99,7 +94,7 @@ protected void reduce(RuleWritable key, Iterable values, Context co if (key.lhs == PrimitiveUtils.MARGINAL_ID) { return; } - context.write(key, new FeaturePair(Vocabulary.id(LABEL), sourceCount)); + context.write(key, new FeaturePair(Vocabulary.id(NAME), sourceCount)); } } @@ -140,10 +135,10 @@ public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { private static final FloatWritable ZERO = new FloatWritable(0.0f); public void unaryGlueRuleScore(int nt, java.util.Map map) { - map.put(Vocabulary.id(LABEL), ZERO); + map.put(Vocabulary.id(NAME), ZERO); } public void binaryGlueRuleScore(int nt, java.util.Map map) { - map.put(Vocabulary.id(LABEL), ZERO); + map.put(Vocabulary.id(NAME), ZERO); } } diff --git a/src/edu/jhu/thrax/hadoop/features/mapred/TargetCountFeature.java b/src/edu/jhu/thrax/hadoop/features/mapred/TargetCountFeature.java index 4d75cc5..6048732 100644 --- a/src/edu/jhu/thrax/hadoop/features/mapred/TargetCountFeature.java +++ b/src/edu/jhu/thrax/hadoop/features/mapred/TargetCountFeature.java @@ -25,16 +25,11 @@ public class TargetCountFeature extends MapReduceFeature { public static final String NAME = "e_count"; - public static final String LABEL = "C(e)"; public String getName() { return NAME; } - public String getLabel() { - return LABEL; - } - public Class sortComparatorClass() { return Comparator.class; } @@ -98,7 +93,7 @@ protected void reduce(RuleWritable key, Iterable values, Context co if (key.lhs == PrimitiveUtils.MARGINAL_ID) { return; } - context.write(key, new FeaturePair(Vocabulary.id(LABEL), targetCount)); + context.write(key, new FeaturePair(Vocabulary.id(NAME), targetCount)); } } @@ -139,10 +134,10 @@ public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { private static final FloatWritable ZERO = new FloatWritable(0.0f); public void unaryGlueRuleScore(int nt, java.util.Map map) { - map.put(Vocabulary.id(LABEL), ZERO); + map.put(Vocabulary.id(NAME), ZERO); } public void binaryGlueRuleScore(int nt, java.util.Map map) { - map.put(Vocabulary.id(LABEL), ZERO); + map.put(Vocabulary.id(NAME), ZERO); } }