@Title(value="Sparse Bit Vector Label Parser") @Description(value="Parser for the lines of the following format:\nA single line provides a single sparse BitVector. The indices of the one-bits are separated by whitespace. The first index starts with zero. Any substring not containing whitespace is tried to be read as an Integer. If this fails, it will be appended to a label. (Thus, any label must not be parseable as an Integer.) Empty lines and lines beginning with \"#\" will be ignored.") public class SparseBitVectorLabelParser extends AbstractParser implements Parser
Modifier and Type | Class and Description |
---|---|
static class |
SparseBitVectorLabelParser.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
private static Logging |
LOG
Class logger
|
ATTRIBUTE_CONCATENATION, comment, COMMENT_PATTERN, DEFAULT_SEPARATOR, NUMBER_PATTERN, QUOTE_CHARS, tokenizer
Constructor and Description |
---|
SparseBitVectorLabelParser(Pattern colSep,
String quoteChars,
Pattern comment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Logging |
getLogger()
Get the logger for this class.
|
protected VectorFieldTypeInformation<BitVector> |
getTypeInformation(int dimensionality) |
MultipleObjectsBundle |
parse(InputStream in)
Returns a list of the objects parsed from the specified input stream.
|
lengthWithoutLinefeed, toString
private static final Logging LOG
public MultipleObjectsBundle parse(InputStream in)
Parser
protected VectorFieldTypeInformation<BitVector> getTypeInformation(int dimensionality)
protected Logging getLogger()
AbstractParser
getLogger
in class AbstractParser