public class NameSampleCountersStream extends FilterObjectStream<NameSample,NameSample>
samples| Modifier | Constructor and Description |
|---|---|
protected |
NameSampleCountersStream(ObjectStream<NameSample> samples) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Integer> |
getNameCounters() |
int |
getSentenceCount() |
int |
getTokenCount() |
void |
printSummary() |
NameSample |
read()
Returns the next object.
|
void |
reset()
Repositions the stream at the beginning and the previously seen object sequence
will be repeated exactly.
|
closeprotected NameSampleCountersStream(ObjectStream<NameSample> samples)
public NameSample read() throws IOException
ObjectStreamIOException - if there is an error during readingpublic void reset()
throws IOException,
UnsupportedOperationException
ObjectStreamreset in interface ObjectStream<NameSample>reset in class FilterObjectStream<NameSample,NameSample>IOException - if there is an error during reseting the streamUnsupportedOperationExceptionpublic int getSentenceCount()
public int getTokenCount()
public void printSummary()
Copyright © 2017 The Apache Software Foundation. All rights reserved.