org.apache.mahout.utils.nlp.collocations.llr
Class GramKeyGroupComparator

java.lang.Object
  extended by org.apache.hadoop.io.WritableComparator
      extended by org.apache.mahout.utils.nlp.collocations.llr.GramKeyGroupComparator
All Implemented Interfaces:
java.util.Comparator, org.apache.hadoop.io.RawComparator

public class GramKeyGroupComparator
extends org.apache.hadoop.io.WritableComparator

Group GramKeys based on their Gram, ignoring the secondary sort key, so that all keys with the same Gram are sent to the same call of the reduce method, sorted in natural order (for GramKeys).


Constructor Summary
protected GramKeyGroupComparator()
           
 
Method Summary
 int compare(org.apache.hadoop.io.WritableComparable a, org.apache.hadoop.io.WritableComparable b)
           
 
Methods inherited from class org.apache.hadoop.io.WritableComparator
compare, compare, compareBytes, define, get, getKeyClass, hashBytes, newKey, readDouble, readFloat, readInt, readLong, readUnsignedShort, readVInt, readVLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

GramKeyGroupComparator

protected GramKeyGroupComparator()
Method Detail

compare

public int compare(org.apache.hadoop.io.WritableComparable a,
                   org.apache.hadoop.io.WritableComparable b)
Overrides:
compare in class org.apache.hadoop.io.WritableComparator


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.