
@Title(value="Term frequency parser") @Description(value="Parse a file containing term frequencies. The expected format is \'label term1term2 ...\'. Terms must not contain the separator character!") public class TermFrequencyParser<V extends SparseNumberVector<?>> extends NumberVectorLabelParser<V> 
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
TermFrequencyParser.Parameterizer<V extends SparseNumberVector<?>>
Parameterization class. 
 | 
BundleStreamSource.Event| Modifier and Type | Field and Description | 
|---|---|
(package private) gnu.trove.map.TObjectIntMap<String> | 
keymap
Map. 
 | 
private static Logging | 
LOG
Class logger. 
 | 
(package private) int | 
maxdim
Maximum dimension used. 
 | 
(package private) boolean | 
normalize
Normalize. 
 | 
private SparseNumberVector.Factory<V,?> | 
sparsefactory
Same as  
NumberVectorLabelParser.factory, but subtype. | 
columnnames, curlbl, curvec, dimensionality, DIMENSIONALITY_UNKNOWN, DIMENSIONALITY_VARIABLE, factory, LABEL_INDICES_ID, labelcolumns, labelIndices, lineNumber, meta, nextevent, VECTOR_TYPE_IDATTRIBUTE_CONCATENATION, comment, COMMENT_PATTERN, DEFAULT_SEPARATOR, NUMBER_PATTERN, QUOTE_CHAR, quoteChar| Constructor and Description | 
|---|
TermFrequencyParser(boolean normalize,
                   Pattern colSep,
                   char quoteChar,
                   Pattern comment,
                   BitSet labelIndices,
                   SparseNumberVector.Factory<V,?> factory)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected Logging | 
getLogger()
Get the logger for this class. 
 | 
protected SimpleTypeInformation<V> | 
getTypeInformation(int dimensionality)
Get a prototype object for the given dimensionality. 
 | 
protected void | 
parseLineInternal(String line)
Internal method for parsing a single line. 
 | 
buildMeta, createDBObject, data, getMeta, initStream, nextEventparsetokenize, toStringprivate static final Logging LOG
int maxdim
gnu.trove.map.TObjectIntMap<String> keymap
boolean normalize
private SparseNumberVector.Factory<V extends SparseNumberVector<?>,?> sparsefactory
NumberVectorLabelParser.factory, but subtype.public TermFrequencyParser(boolean normalize,
                   Pattern colSep,
                   char quoteChar,
                   Pattern comment,
                   BitSet labelIndices,
                   SparseNumberVector.Factory<V,?> factory)
normalize - NormalizecolSep - Column separatorquoteChar - Quotation charactercomment - Comment patternlabelIndices - Indices to use as labelsprotected void parseLineInternal(String line)
NumberVectorLabelParserparseLineInternal in class NumberVectorLabelParser<V extends SparseNumberVector<?>>line - Line to processprotected SimpleTypeInformation<V> getTypeInformation(int dimensionality)
NumberVectorLabelParsergetTypeInformation in class NumberVectorLabelParser<V extends SparseNumberVector<?>>dimensionality - Dimensionalityprotected Logging getLogger()
AbstractParsergetLogger in class NumberVectorLabelParser<V extends SparseNumberVector<?>>