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) it.unimi.dsi.fastutil.longs.LongArrayList |
buf
Buffer, will be reused.
|
(package private) BitVector |
curvec
Current vector.
|
(package private) it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<java.lang.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.
|
java.lang.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(java.io.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
it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<java.lang.String> keymap
protected BundleMeta meta
BundleStreamSource.Event nextevent
BitVector curvec
it.unimi.dsi.fastutil.longs.LongArrayList buf
public SimpleTransactionParser(CSVReaderFormat format)
format
- Input formatpublic void initStream(java.io.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 java.lang.Object data(int rnum)
BundleStreamSource
rnum
- Representation numberpublic BundleMeta getMeta()
BundleStreamSource
protected Logging getLogger()
AbstractStreamingParser
getLogger
in class AbstractStreamingParser
Copyright © 2019 ELKI Development Team. License information.