Package | Description |
---|---|
org.apache.mahout.vectorizer.collocations.llr |
Modifier and Type | Method and Description |
---|---|
int |
GramKeyPartitioner.getPartition(GramKey key,
Gram value,
int numPartitions) |
protected void |
LLRReducer.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.
|
void |
GramKey.set(Gram gram,
byte[] order)
set the gram held by this key
|
Modifier and Type | Method and Description |
---|---|
protected void |
CollocReducer.processSubgram(Iterator<Gram> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
Sum frequencies for subgram, ngrams and deliver ngram, subgram pairs to the collector.
|
protected void |
CollocReducer.processUnigram(Iterator<Gram> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
Sum frequencies for unigrams and deliver to the collector
|
protected void |
LLRReducer.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 |
CollocReducer.reduce(GramKey key,
Iterable<Gram> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
collocation finder: pass 1 reduce phase:
given input from the mapper,
|
protected void |
CollocCombiner.reduce(GramKey key,
Iterable<Gram> values,
org.apache.hadoop.mapreduce.Reducer.Context context) |
Constructor and Description |
---|
Gram(Gram other)
Copy constructor
|
GramKey(Gram gram,
byte[] order)
create a GramKey based on the specified Gram and order
|
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.