public class Conll03NameSampleStream extends Object implements ObjectStream<NameSample>
Modifier and Type | Class and Description |
---|---|
static class |
Conll03NameSampleStream.LANGUAGE |
Constructor and Description |
---|
Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang,
InputStreamFactory in,
int types) |
Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang,
ObjectStream<String> lineStream,
int types) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the
ObjectStream and releases all allocated
resources. |
NameSample |
read()
Returns the next object.
|
void |
reset()
Repositions the stream at the beginning and the previously seen object sequence
will be repeated exactly.
|
public Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, ObjectStream<String> lineStream, int types)
lang
- the language of the CONLL 03 datalineStream
- an Object Stream over the lines in the CONLL 03 data filetypes
- the entity types to include in the Name Sample object streampublic Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, InputStreamFactory in, int types) throws IOException
IOException
public NameSample read() throws IOException
ObjectStream
read
in interface ObjectStream<NameSample>
IOException
- if there is an error during readingpublic void reset() throws IOException, UnsupportedOperationException
ObjectStream
reset
in interface ObjectStream<NameSample>
IOException
- if there is an error during reseting the streamUnsupportedOperationException
public void close() throws IOException
ObjectStream
ObjectStream
and releases all allocated
resources. After close was called its not allowed to call
read or reset.close
in interface AutoCloseable
close
in interface ObjectStream<NameSample>
IOException
- if there is an error during closing the streamCopyright © 2017 The Apache Software Foundation. All rights reserved.