Class ADPOSSampleStream
Note: Do not use this class, internal use only!
public class ADPOSSampleStream : ObjectStreamBase<POSSample?>, IObjectStream<POSSample?>, IDisposable
- Inheritance
-
ADPOSSampleStream
- Implements
- Inherited Members
Constructors
ADPOSSampleStream(IInputStreamFactory, string, bool, bool)
public ADPOSSampleStream(IInputStreamFactory @in, string charsetName, bool expandME, bool includeFeatures)
Parameters
inIInputStreamFactorythe Corpus Stream
charsetNamestringthe charset of the Arvores Deitadas Corpus
expandMEboolif 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)
includeFeaturesboolif true will combine the POS Tag with the feature tags
Exceptions
- IOException
if there is an error during reading
ADPOSSampleStream(IObjectStream<string?>, bool, bool)
Creates a new POSSample stream from a line stream, i.e. IObjectStream<T> of string, that could be a PlainTextByLineStream object.
public ADPOSSampleStream(IObjectStream<string?> lineStream, bool expandME, bool includeFeatures)
Parameters
lineStreamIObjectStream<string>a stream of lines as string
expandMEboolif 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)
includeFeaturesboolif true will combine the POS Tag with the feature tags
Methods
Dispose(bool)
Releases the resources from this object stream.
protected override void Dispose(bool disposing)
Parameters
disposingbool
Read()
Returns the next object. Calling this method repeatedly until it returns
null will return each object from the underlying source exactly once.
public override POSSample? Read()
Returns
- POSSample
the next object or
nullto signal that the stream is exhausted
Exceptions
- IOException
if there is an error during reading
- IOException
if there is an error during reading
Reset()
Repositions the stream at the beginning and the previously seen object sequence will be repeated exactly. This method can be used to re-read the stream if multiple passes over the objects are required.
The implementation of this method is optional.
public override void Reset()
Exceptions
- IOException
if there is an error during resetting the stream
- NotSupportedException
if reset is not supported on this stream
- IOException
if there is an error during resetting the stream
- NotSupportedException
if the underlying stream does not support resetting