You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Ryan Josal <ry...@josal.com> on 2013/03/25 20:55:11 UTC

SequenceFileVectorWriter key class

Hi all,

  In looking for a solution to the type mismatch between the output of
lucene.vector and the input of cvb lda, I found
org.apache.mahout.utils.vectors.io.SequenceFileVectorWriter in the
mahout integration source assumes the SequenceFile.Writer object it
takes as a constructor parameter's keyClass is always LongWritable.
I've used reflection to create and cast to the expected class.  This
made it a one liner to change vectors.lucene.Driver to use
IntWritables as keys, and could also be set with a parameter if
needed.  It looks like this class is only used for creating vectors
from Lucene and ARFF.

Is this useful to anyone else?

Ryan