## org.apache.mahout.vectorizer
Class EncodingMapper

    java.lang.Object
      org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,VectorWritable>
          org.apache.mahout.vectorizer.EncodingMapper

    public class EncodingMapper

extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,VectorWritable>

The Mapper that does the work of encoding text

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
`org.apache.hadoop.mapreduce.Mapper.Context`

Field Summary
`static String` `ANALYZER_NAME`
`static String` `CARDINALITY`
`static String` `ENCODER_CLASS`
`static String` `ENCODER_FIELD_NAME`
`static String` `USE_NAMED_VECTORS`
`static String` `USE_SEQUENTIAL`

Constructor Summary
`EncodingMapper()`

Method Summary
`protected void` `map(org.apache.hadoop.io.Text key, org.apache.hadoop.io.Text value, org.apache.hadoop.mapreduce.Mapper.Context context)`
`protected void` `setup(org.apache.hadoop.mapreduce.Mapper.Context context)`

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`

Field Detail

### USE_NAMED_VECTORS

    public static final String USE_NAMED_VECTORS

See Also:
  Constant Field Values

### USE_SEQUENTIAL

    public static final String USE_SEQUENTIAL

See Also:
  Constant Field Values

### ANALYZER_NAME

    public static final String ANALYZER_NAME

See Also:
  Constant Field Values

### ENCODER_FIELD_NAME

    public static final String ENCODER_FIELD_NAME

See Also:
  Constant Field Values

### ENCODER_CLASS

    public static final String ENCODER_CLASS

See Also:
  Constant Field Values

### CARDINALITY

    public static final String CARDINALITY

See Also:
  Constant Field Values

Constructor Detail

### EncodingMapper

    public EncodingMapper()

Method Detail

### setup

    protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
                  throws IOException,
                         InterruptedException

  Overrides:
    `setup` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,VectorWritable>`
  Throws:
    `IOException`
    `InterruptedException`

### map

    protected void map(org.apache.hadoop.io.Text key,
                       org.apache.hadoop.io.Text value,
                       org.apache.hadoop.mapreduce.Mapper.Context context)
                throws IOException,
                       InterruptedException

  Overrides:
    `map` in class `org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,VectorWritable>`
  Throws:
    `IOException`
    `InterruptedException`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.