public class TokenSampleStream extends FilterObjectStream<java.lang.String,TokenSample>
TokenSamples out of them. The input string sample is tokenized if a
whitespace or the special separator chars occur.
Sample:
"token1 token2 token3<SPLIT>token4"
The tokens token1 and token2 are separated by a whitespace, token3 and token3
are separated by the special character sequence, in this case the default
split sequence.
The sequence must be unique in the input string and is not escaped.
| Constructor and Description |
|---|
TokenSampleStream(ObjectStream<java.lang.String> sentences) |
TokenSampleStream(ObjectStream<java.lang.String> sampleStrings,
java.lang.String separatorChars) |
| Modifier and Type | Method and Description |
|---|---|
TokenSample |
read()
Returns the next object.
|
close, resetpublic TokenSampleStream(ObjectStream<java.lang.String> sampleStrings, java.lang.String separatorChars)
public TokenSampleStream(ObjectStream<java.lang.String> sentences)
public TokenSample read() throws java.io.IOException
ObjectStreamjava.io.IOException - if there is an error during readingCopyright © 2010 - 2023 Adobe. All Rights Reserved