Example usage for org.apache.mahout.vectorizer.collocations.llr GramKey getPrimaryLength

List of usage examples for org.apache.mahout.vectorizer.collocations.llr GramKey getPrimaryLength

Introduction

In this page you can find the example usage for org.apache.mahout.vectorizer.collocations.llr GramKey getPrimaryLength.

Prototype

public int getPrimaryLength() 

Source Link

Usage

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());
}