public class ADExPOSSampleStream extends Object implements opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>
| Constructor and Description |
|---|
ADExPOSSampleStream(opennlp.tools.util.ObjectStream<String> lineStream,
boolean expandME,
boolean includeFeatures,
boolean additionalContext)
Creates a new
POSSample stream from a line stream, i.e. |
public ADExPOSSampleStream(opennlp.tools.util.ObjectStream<String> lineStream, boolean expandME, boolean includeFeatures, boolean additionalContext)
POSSample stream from a line stream, i.e.
ObjectStream< String>, that could be a
PlainTextByLineStream object.lineStream - a stream of lines as StringexpandME - if true will expand the multiword expressions, each word of the
expression will have the POS Tag that was attributed to the
expression plus the prefix B- or I- (CONLL convention)includeFeatures - if true will combine the POS Tag with the feature tagspublic opennlp.tools.postag.POSSample read()
throws IOException
read in interface opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>IOExceptionpublic void reset()
throws IOException,
UnsupportedOperationException
reset in interface opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>IOExceptionUnsupportedOperationExceptionpublic void close()
throws IOException
close in interface AutoCloseableclose in interface opennlp.tools.util.ObjectStream<opennlp.tools.postag.POSSample>IOExceptionCopyright © 2012–2017 CoGrOO. All rights reserved.