org.apache.mahout.utils.vectors.lucene
Class TFDFMapper

java.lang.Object
  extended by org.apache.lucene.index.TermVectorMapper
      extended by org.apache.mahout.utils.vectors.lucene.VectorMapper
          extended by org.apache.mahout.utils.vectors.lucene.TFDFMapper

public class TFDFMapper
extends VectorMapper

Not thread-safe


Constructor Summary
TFDFMapper(org.apache.lucene.index.IndexReader reader, Weight weight, TermInfo termInfo)
           
 
Method Summary
 Vector getVector()
          Can be called after the TermVector has been mapped
 boolean isIgnoringOffsets()
           
 boolean isIgnoringPositions()
           
 void map(String term, int frequency, org.apache.lucene.index.TermVectorOffsetInfo[] offsets, int[] positions)
           
 void setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions)
           
 
Methods inherited from class org.apache.lucene.index.TermVectorMapper
setDocumentNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TFDFMapper

public TFDFMapper(org.apache.lucene.index.IndexReader reader,
                  Weight weight,
                  TermInfo termInfo)
Method Detail

getVector

public Vector getVector()
Description copied from class: VectorMapper
Can be called after the TermVector has been mapped

Specified by:
getVector in class VectorMapper
Returns:
The Vector
See Also:
TermVectorMapper.map(String, int, org.apache.lucene.index.TermVectorOffsetInfo[], int[])

setExpectations

public void setExpectations(String field,
                            int numTerms,
                            boolean storeOffsets,
                            boolean storePositions)
Specified by:
setExpectations in class org.apache.lucene.index.TermVectorMapper

map

public void map(String term,
                int frequency,
                org.apache.lucene.index.TermVectorOffsetInfo[] offsets,
                int[] positions)
Specified by:
map in class org.apache.lucene.index.TermVectorMapper

isIgnoringPositions

public boolean isIgnoringPositions()
Overrides:
isIgnoringPositions in class org.apache.lucene.index.TermVectorMapper

isIgnoringOffsets

public boolean isIgnoringOffsets()
Overrides:
isIgnoringOffsets in class org.apache.lucene.index.TermVectorMapper


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.