Package cc.mallet.pipe
Class Csv2Array
- java.lang.Object
-
- cc.mallet.pipe.Pipe
-
- cc.mallet.pipe.Csv2Array
-
- All Implemented Interfaces:
AlphabetCarrying
,java.io.Serializable
public class Csv2Array extends Pipe
Converts a string of comma separated values to an array. To be used prior toArray2FeatureVector
. Note that this class assumes that each location of the line corresponds to a feature index (i.e. "dense" representation) eg: instance 1: 1,0,0,1,0,0,1 << feature alphabet size = 7 instance 2: 0,0,1,0,0,0,1 << feature alphabet size = 7- Author:
- Aron Culotta
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Csv2Array()
Csv2Array(CharSequenceLexer l)
Csv2Array(java.lang.String regex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instance
pipe(Instance carrier)
Convert the data in anInstance
from a CharSequence of comma-separated-values to an array, where each index is the feature name.-
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
-
-
-
-
Constructor Detail
-
Csv2Array
public Csv2Array()
-
Csv2Array
public Csv2Array(java.lang.String regex)
-
Csv2Array
public Csv2Array(CharSequenceLexer l)
-
-