public class Conll02NameSampleStream extends Object implements ObjectStream<NameSample>
The dutch data has a -DOCSTART- tag to mark article boundaries,
adaptive data in the feature generators will be cleared before every article.
The spanish data does not contain article boundaries,
adaptive data will be cleared for every sentence.
The data contains four named entity types: Person, Organization, Location and Misc.
Data can be found on this web site:
http://www.cnts.ua.ac.be/conll2002/ner/
Note: Do not use this class, internal use only!
Modifier and Type | Class and Description |
---|---|
static class |
Conll02NameSampleStream.LANGUAGE |
Modifier and Type | Field and Description |
---|---|
static String |
DOCSTART |
static int |
GENERATE_LOCATION_ENTITIES |
static int |
GENERATE_MISC_ENTITIES |
static int |
GENERATE_ORGANIZATION_ENTITIES |
static int |
GENERATE_PERSON_ENTITIES |
Constructor and Description |
---|
Conll02NameSampleStream(Conll02NameSampleStream.LANGUAGE lang,
InputStreamFactory in,
int types) |
Conll02NameSampleStream(Conll02NameSampleStream.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 static final int GENERATE_PERSON_ENTITIES
public static final int GENERATE_ORGANIZATION_ENTITIES
public static final int GENERATE_LOCATION_ENTITIES
public static final int GENERATE_MISC_ENTITIES
public static final String DOCSTART
public Conll02NameSampleStream(Conll02NameSampleStream.LANGUAGE lang, ObjectStream<String> lineStream, int types)
public Conll02NameSampleStream(Conll02NameSampleStream.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 © 2020 The Apache Software Foundation. All rights reserved.