|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.formats.Conll02NameSampleStream
public class Conll02NameSampleStream
Parser for the dutch and spanish ner training files of the CONLL 2002 shared task.
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!
Nested Class Summary | |
---|---|
static class |
Conll02NameSampleStream.LANGUAGE
|
Field Summary | |
---|---|
static int |
GENERATE_LOCATION_ENTITIES
|
static int |
GENERATE_MISC_ENTITIES
|
static int |
GENERATE_ORGANIZATION_ENTITIES
|
static int |
GENERATE_PERSON_ENTITIES
|
Constructor Summary | |
---|---|
Conll02NameSampleStream(Conll02NameSampleStream.LANGUAGE lang,
InputStream in,
int types)
|
|
Conll02NameSampleStream(Conll02NameSampleStream.LANGUAGE lang,
ObjectStream<String> lineStream,
int types)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public Conll02NameSampleStream(Conll02NameSampleStream.LANGUAGE lang, ObjectStream<String> lineStream, int types)
public Conll02NameSampleStream(Conll02NameSampleStream.LANGUAGE lang, InputStream in, int types)
lang
- in
- an Input Stream to read data.
IOException
Method Detail |
---|
public NameSample read() throws IOException
ObjectStream
read
in interface ObjectStream<NameSample>
IOException
public void reset() throws IOException, UnsupportedOperationException
ObjectStream
reset
in interface ObjectStream<NameSample>
IOException
UnsupportedOperationException
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 ObjectStream<NameSample>
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |