List of usage examples for org.apache.mahout.vectorizer.collocations.llr GramKey getPrimaryLength
public int getPrimaryLength()
From source file:edu.rosehulman.GramKeyGroupComparator.java
License:Apache License
@Override public int compare(WritableComparable a, WritableComparable b) { GramKey gka = (GramKey) a; GramKey gkb = (GramKey) b;/*w w w .ja v a2s . c o m*/ return WritableComparator.compareBytes(gka.getBytes(), 0, gka.getPrimaryLength(), gkb.getBytes(), 0, gkb.getPrimaryLength()); }