Modifier and Type | Class and Description |
---|---|
static class |
LLRReducer.ConcreteLLCallback
concrete implementation delegates to LogLikelihood class
|
static interface |
LLRReducer.LLCallback
provide interface so the input to the llr calculation can be captured for validation in unit testing
|
static class |
LLRReducer.Skipped
Counter to track why a particlar entry was skipped
|
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_MIN_LLR |
static String |
MIN_LLR |
static String |
NGRAM_TOTAL |
Constructor and Description |
---|
LLRReducer() |
Modifier and Type | Method and Description |
---|---|
protected void |
reduce(Gram ngram,
Iterable<Gram> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
Perform LLR calculation, input is: k:ngram:ngramFreq v:(h_|t_)subgram:subgramfreq N = ngram total
Each ngram will have 2 subgrams, a head and a tail, referred to as A and B respectively below.
|
protected void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context) |
public static final String NGRAM_TOTAL
public static final String MIN_LLR
public static final float DEFAULT_MIN_LLR
protected void reduce(Gram ngram, Iterable<Gram> values, org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
reduce
in class org.apache.hadoop.mapreduce.Reducer<Gram,Gram,org.apache.hadoop.io.Text,org.apache.hadoop.io.DoubleWritable>
IOException
InterruptedException
protected void setup(org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
setup
in class org.apache.hadoop.mapreduce.Reducer<Gram,Gram,org.apache.hadoop.io.Text,org.apache.hadoop.io.DoubleWritable>
IOException
InterruptedException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.