|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.datasource.parser.AbstractParser
de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser<SparseFloatVector>
de.lmu.ifi.dbs.elki.datasource.parser.TermFrequencyParser
@Title(value="Term frequency parser") @Description(value="Parse a file containing term frequencies. The expected format is \'label term1term2 public class TermFrequencyParser...\'. Terms must not contain the separator character!")

A parser to load term frequency data, which essentially are sparse vectors with text keys.
| Nested Class Summary | |
|---|---|
static class |
TermFrequencyParser.Parameterizer
Parameterization class. |
| Field Summary | |
|---|---|
(package private) HashMap<String,Integer> |
keymap
Map |
private static Logging |
logger
Class logger |
(package private) int |
maxdim
Maximum dimension used |
| Fields inherited from class de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser |
|---|
LABEL_INDICES_ID, labelIndices |
| Fields inherited from class de.lmu.ifi.dbs.elki.datasource.parser.AbstractParser |
|---|
ATTRIBUTE_CONCATENATION, COLUMN_SEPARATOR_ID, COMMENT, NUMBER_PATTERN, QUOTE_CHAR, QUOTE_ID, quoteChar, WHITESPACE_PATTERN |
| Constructor Summary | |
|---|---|
TermFrequencyParser(Pattern colSep,
char quoteChar,
BitSet labelIndices)
Constructor. |
|
| Method Summary | |
|---|---|
protected SparseFloatVector |
createDBObject(List<Double> attributes)
Creates a database object of type V. |
protected Logging |
getLogger()
Get the logger for this class. |
protected VectorFieldTypeInformation<SparseFloatVector> |
getTypeInformation(int dimensionality)
Get a prototype object for the given dimensionality. |
MultipleObjectsBundle |
parse(InputStream in)
Returns a list of the objects parsed from the specified input stream. |
Pair<SparseFloatVector,LabelList> |
parseLineInternal(String line)
Internal method for parsing a single line. |
| Methods inherited from class de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser |
|---|
parseLine |
| Methods inherited from class de.lmu.ifi.dbs.elki.datasource.parser.AbstractParser |
|---|
tokenize, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final Logging logger
int maxdim
HashMap<String,Integer> keymap
| Constructor Detail |
|---|
public TermFrequencyParser(Pattern colSep,
char quoteChar,
BitSet labelIndices)
colSep - quoteChar - labelIndices - | Method Detail |
|---|
protected SparseFloatVector createDBObject(List<Double> attributes)
NumberVectorLabelParserCreates a database object of type V.
createDBObject in class NumberVectorLabelParser<SparseFloatVector>attributes - the attributes of the vector to create.
public Pair<SparseFloatVector,LabelList> parseLineInternal(String line)
NumberVectorLabelParser
parseLineInternal in class NumberVectorLabelParser<SparseFloatVector>line - Line to process
public MultipleObjectsBundle parse(InputStream in)
Parser
parse in interface Parserparse in class NumberVectorLabelParser<SparseFloatVector>in - the stream to parse objects from
protected VectorFieldTypeInformation<SparseFloatVector> getTypeInformation(int dimensionality)
NumberVectorLabelParser
getTypeInformation in class NumberVectorLabelParser<SparseFloatVector>dimensionality - Dimensionality
protected Logging getLogger()
AbstractParser
getLogger in class AbstractParser
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||