Class ADPOSSampleStream
java.lang.Object
opennlp.tools.formats.ad.ADPOSSampleStream
- All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>
@Internal
public class ADPOSSampleStream
extends Object
implements opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>
Note:
Do not use this class, internal use only!
-
Constructor Summary
ConstructorsConstructorDescriptionADPOSSampleStream(opennlp.tools.util.InputStreamFactory in, String charsetName, boolean expandME, boolean includeFeatures) Creates a newPOSSamplestream from anInputStreamFactoryADPOSSampleStream(opennlp.tools.util.ObjectStream<String> lineStream, boolean expandME, boolean includeFeatures) Creates a newADPOSSampleStreamstream from aopennlp.tools.util.ObjectStream<String>, that could be aPlainTextByLineStreamobject. -
Method Summary
-
Constructor Details
-
ADPOSSampleStream
public ADPOSSampleStream(opennlp.tools.util.ObjectStream<String> lineStream, boolean expandME, boolean includeFeatures) Creates a newADPOSSampleStreamstream from aopennlp.tools.util.ObjectStream<String>, that could be aPlainTextByLineStreamobject.- Parameters:
lineStream- Aopennlp.tools.util.ObjectStream<String>stream as input.expandME- Iftruewill expand the multiword expressions, each word of the expression will have the POS Tag that was attributed to the expression plus the prefixB-orI-(CONLL convention).includeFeatures- Iftruewill combine the POS Tag with the feature tags.
-
ADPOSSampleStream
public ADPOSSampleStream(opennlp.tools.util.InputStreamFactory in, String charsetName, boolean expandME, boolean includeFeatures) throws IOException Creates a newPOSSamplestream from anInputStreamFactory- Parameters:
in- TheInputStreamFactoryfor the corpus.charsetName- Thecharsetto use for reading of the corpus.expandME- Iftruewill expand the multiword expressions, each word of the expression will have the POS Tag that was attributed to the expression plus the prefixB-orI-(CONLL convention).includeFeatures- Iftruewill combine the POS Tag with the feature tags.- Throws:
IOException
-
-
Method Details
-
read
- Specified by:
readin interfaceopennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>- Throws:
IOException
-
reset
- Specified by:
resetin interfaceopennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>- Throws:
IOExceptionUnsupportedOperationException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceopennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>- Throws:
IOException
-