public class SimpleTransactionParser extends AbstractStreamingParser
bread butter milk paste tomato basilTODO: add a parameter to e.g. use the first or last entry as labels instead of tokens.
Modifier and Type | Class and Description |
---|---|
static class |
SimpleTransactionParser.Parameterizer
Parameterization class.
|
BundleStreamSource.Event
Modifier and Type | Field and Description |
---|---|
(package private) TLongArrayList |
buf
Buffer, will be reused.
|
(package private) BitVector |
curvec
Current vector.
|
(package private) TObjectIntMap<String> |
keymap
Map.
|
private static Logging |
LOG
Class logger.
|
protected BundleMeta |
meta
Metadata.
|
(package private) BundleStreamSource.Event |
nextevent
Event to report next.
|
(package private) int |
numterms
Number of different terms observed.
|
reader, tokenizer
Constructor and Description |
---|
SimpleTransactionParser(CSVReaderFormat format)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Perform cleanup operations after parsing.
|
Object |
data(int rnum)
Access a particular object and representation.
|
protected Logging |
getLogger()
Get the logger for this class.
|
BundleMeta |
getMeta()
Get the current meta data.
|
void |
initStream(InputStream in)
Init the streaming parser for the given input stream.
|
BundleStreamSource.Event |
nextEvent()
Get the next event
|
asMultipleObjectsBundle, assignDBID, hasDBIDs, parse
private static final Logging LOG
int numterms
TObjectIntMap<String> keymap
protected BundleMeta meta
BundleStreamSource.Event nextevent
BitVector curvec
TLongArrayList buf
public SimpleTransactionParser(CSVReaderFormat format)
format
- Input formatpublic void initStream(InputStream in)
StreamingParser
initStream
in interface StreamingParser
initStream
in class AbstractStreamingParser
in
- the stream to parse objects frompublic BundleStreamSource.Event nextEvent()
BundleStreamSource
public void cleanup()
Parser
cleanup
in interface Parser
cleanup
in class AbstractStreamingParser
public Object data(int rnum)
BundleStreamSource
rnum
- Representation numberpublic BundleMeta getMeta()
BundleStreamSource
protected Logging getLogger()
AbstractStreamingParser
getLogger
in class AbstractStreamingParser
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.