Package cc.mallet.pipe.iterator
Class SegmentIterator
- java.lang.Object
-
- cc.mallet.pipe.iterator.SegmentIterator
-
-
Constructor Summary
Constructors Constructor Description SegmentIterator(Transducer model, InstanceList ilist, java.lang.Object[] segmentStartTags, java.lang.Object[] segmentContinueTags)NOTE!: Assumes thatsegmentStartTags[i]corresponds tosegmentContinueTags[i].SegmentIterator(Transducer model, Instance instance, java.lang.Object[] segmentStartTags, java.lang.Object[] segmentContinueTags)SegmentIterator(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] inTags, java.util.ArrayList predictions)Useful when noTransduceis specified.SegmentIterator(Instance instance, java.lang.Object[] startTags, java.lang.Object[] inTags, Sequence prediction)Iterate over segments in one instance.SegmentIterator(Sequence input, Sequence predicted, Sequence truth, java.lang.Object[] startTags, java.lang.Object[] inTags)Iterate over segments in one labeled sequence
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Instancenext()SegmentnextSegment()voidremove()java.util.ArrayListtoArrayList()
-
-
-
Constructor Detail
-
SegmentIterator
public SegmentIterator(Transducer model, InstanceList ilist, java.lang.Object[] segmentStartTags, java.lang.Object[] segmentContinueTags)
NOTE!: Assumes thatsegmentStartTags[i]corresponds tosegmentContinueTags[i].- Parameters:
model- model to segment input sequencesilist- list of instances to be segmentedsegmentStartTags- array of tags indicating the start of a segmentsegmentContinueTags- array of tags indicating the continuation of a segment
-
SegmentIterator
public SegmentIterator(Transducer model, Instance instance, java.lang.Object[] segmentStartTags, java.lang.Object[] segmentContinueTags)
-
SegmentIterator
public SegmentIterator(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] inTags, java.util.ArrayList predictions)
Useful when noTransduceis specified. A list of sequences specifies the output.- Parameters:
ilist- InstanceList containing sequence.segmentStartTags- array of tags indicating the start of a segmentsegmentContinueTags- array of tags indicating the continuation of a segmentpredictions- list ofSequences that are the predicted output of someTransducer
-
SegmentIterator
public SegmentIterator(Instance instance, java.lang.Object[] startTags, java.lang.Object[] inTags, Sequence prediction)
Iterate over segments in one instance.- Parameters:
ilist- InstanceList containing sequence.segmentStartTags- array of tags indicating the start of a segmentsegmentContinueTags- array of tags indicating the continuation of a segmentpredictions- list ofSequences that are the predicted output of someTransducer
-
-