Class Conll03NameSampleStream
java.lang.Object
opennlp.tools.formats.Conll03NameSampleStream
- All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>
public class Conll03NameSampleStream
extends Object
implements opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>
An import stream which can parse the CONLL03 data.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, opennlp.tools.util.InputStreamFactory in, int types) Initializes aConll03NameSampleStream.Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, opennlp.tools.util.ObjectStream<String> lineStream, int types) Initializes aConll03NameSampleStream. -
Method Summary
-
Constructor Details
-
Conll03NameSampleStream
public Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, opennlp.tools.util.ObjectStream<String> lineStream, int types) Initializes aConll03NameSampleStream.- Parameters:
lang- The language of the CONLL 03 data.lineStream- Anopennlp.tools.util.ObjectStream<String>over the lines in the CONLL 03 data file.types- The entity types to include in the Name Sample object stream.
-
Conll03NameSampleStream
public Conll03NameSampleStream(Conll03NameSampleStream.LANGUAGE lang, opennlp.tools.util.InputStreamFactory in, int types) throws IOException Initializes aConll03NameSampleStream.- Parameters:
lang- The language of the CONLL 03 data.in- TheInputStreamFactoryfor the input file.types- The entity types to include in the Name Sample object stream.- Throws:
IOException- Thrown if IO errors occurred.
-
-
Method Details
-
read
- Specified by:
readin interfaceopennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>- Throws:
IOException
-
reset
- Specified by:
resetin interfaceopennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>- Throws:
IOExceptionUnsupportedOperationException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceopennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>- Throws:
IOException
-