org.apache.mahout.utils.vectors
Class VectorHelper
java.lang.Object
org.apache.mahout.utils.vectors.VectorHelper
public final class VectorHelper
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
vectorToCSVString
public static String vectorToCSVString(Vector vector,
boolean namesAsComments)
throws IOException
- Throws:
IOException
vectorToCSVString
public static void vectorToCSVString(Vector vector,
boolean namesAsComments,
Appendable bldr)
throws IOException
- Throws:
IOException
loadTermDictionary
public static String[] loadTermDictionary(File dictFile)
throws IOException
- Read in a dictionary file. Format is:
term DocFreq Index
- Throws:
IOException
loadTermDictionary
public static String[] loadTermDictionary(org.apache.hadoop.conf.Configuration conf,
String filePattern)
- Read a dictionary in
SequenceFile
generated by
DictionaryVectorizer
- Parameters:
filePattern
- /dictionary.file-*
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.