gov.llnl.ontology.mapreduce.stats
Class WordOccurrenceCountMR.WordOccurrenceCountMapper
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result,KEYOUT,VALUEOUT>
org.apache.hadoop.hbase.mapreduce.TableMapper<K,V>
gov.llnl.ontology.mapreduce.CorpusTableMR.CorpusTableMapper<StringPair,org.apache.hadoop.io.IntWritable>
gov.llnl.ontology.mapreduce.stats.WordOccurrenceCountMR.WordOccurrenceCountMapper
- Enclosing class:
- WordOccurrenceCountMR
public static class WordOccurrenceCountMR.WordOccurrenceCountMapper
- extends CorpusTableMR.CorpusTableMapper<StringPair,org.apache.hadoop.io.IntWritable>
The TableMapper
responsible for most of the work.
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper |
org.apache.hadoop.mapreduce.Mapper.Context |
Method Summary |
protected void |
addContextTerms(StringCounter counts,
Queue<edu.stanford.nlp.pipeline.Annotation> words,
int distance)
Adds a count for each word feature in words to count . |
void |
map(org.apache.hadoop.hbase.io.ImmutableBytesWritable key,
org.apache.hadoop.hbase.client.Result row,
org.apache.hadoop.mapreduce.Mapper.Context context)
|
void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context,
org.apache.hadoop.conf.Configuration conf)
Sets up any addition data classes or information needed by the CorpusTableMR.CorpusTableMapper . |
Methods inherited from class org.apache.hadoop.mapreduce.Mapper |
cleanup, run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WordOccurrenceCountMR.WordOccurrenceCountMapper
public WordOccurrenceCountMR.WordOccurrenceCountMapper()
setup
public void setup(org.apache.hadoop.mapreduce.Mapper.Context context,
org.apache.hadoop.conf.Configuration conf)
throws IOException,
InterruptedException
- Sets up any addition data classes or information needed by the
CorpusTableMR.CorpusTableMapper
. By default, this does nothing.
- Overrides:
setup
in class CorpusTableMR.CorpusTableMapper<StringPair,org.apache.hadoop.io.IntWritable>
- Throws:
IOException
InterruptedException
map
public void map(org.apache.hadoop.hbase.io.ImmutableBytesWritable key,
org.apache.hadoop.hbase.client.Result row,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
-
- Overrides:
map
in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Result,StringPair,org.apache.hadoop.io.IntWritable>
- Throws:
IOException
InterruptedException
addContextTerms
protected void addContextTerms(StringCounter counts,
Queue<edu.stanford.nlp.pipeline.Annotation> words,
int distance)
throws IOException,
InterruptedException
- Adds a count for each word feature in
words
to count
.
If usePos
is true, the feature will be the word plus the part
of speech. If useOrdering
is true, the feature will be the
word plus the distance, positive or negative, from the focus word.
- Throws:
IOException
InterruptedException
Copyright © 2010-2011. All Rights Reserved.