Package cc.mallet.pipe
Class Csv2FeatureVector
- java.lang.Object
-
- cc.mallet.pipe.Pipe
-
- cc.mallet.pipe.Csv2FeatureVector
-
- All Implemented Interfaces:
AlphabetCarrying
,java.io.Serializable
public class Csv2FeatureVector extends Pipe
Converts a string of the form feature_1:val_1 feature_2:val_2 ... feature_k:val_k into a (sparse) FeatureVector. Features with no ":" character are assumed to have value 1.0.- Author:
- Gary Huang
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Csv2FeatureVector()
Csv2FeatureVector(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instance
pipe(Instance carrier)
Convert the data in the given Instance from a CharSequence of sparse feature-value pairs to a FeatureVector-
Methods inherited from class cc.mallet.pipe.Pipe
alphabetsMatch, getAlphabet, getAlphabets, getDataAlphabet, getInstanceId, getTargetAlphabet, instanceFrom, instancesFrom, instancesFrom, isDataAlphabetSet, isTargetProcessing, newIteratorFrom, preceedingPipeDataAlphabetNotification, preceedingPipeTargetAlphabetNotification, precondition, readResolve, setDataAlphabet, setOrCheckDataAlphabet, setOrCheckTargetAlphabet, setTargetAlphabet, setTargetProcessing
-
-