|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.pipe.iterator.SegmentIterator
public class SegmentIterator
Iterates over Segment
s extracted by a Transducer
for some InstanceList
.
Constructor Summary | |
---|---|
SegmentIterator(InstanceList ilist,
java.lang.Object[] startTags,
java.lang.Object[] inTags,
java.util.ArrayList predictions)
Useful when no Transduce is 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 |
|
SegmentIterator(Transducer model,
InstanceList ilist,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
NOTE!: Assumes that segmentStartTags[i] corresponds
to segmentContinueTags[i] . |
|
SegmentIterator(Transducer model,
Instance instance,
java.lang.Object[] segmentStartTags,
java.lang.Object[] segmentContinueTags)
Iterates over Segment s for only one Instance . |
Method Summary | |
---|---|
boolean |
hasNext()
|
Instance |
next()
|
Segment |
nextSegment()
|
void |
remove()
|
java.util.ArrayList |
toArrayList()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SegmentIterator(Transducer model, InstanceList ilist, java.lang.Object[] segmentStartTags, java.lang.Object[] segmentContinueTags)
segmentStartTags[i]
corresponds
to segmentContinueTags[i]
.
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 segmentpublic SegmentIterator(Transducer model, Instance instance, java.lang.Object[] segmentStartTags, java.lang.Object[] segmentContinueTags)
Segment
s for only one Instance
.
public SegmentIterator(InstanceList ilist, java.lang.Object[] startTags, java.lang.Object[] inTags, java.util.ArrayList predictions)
Transduce
is specified. A list of
sequences specifies the output.
ilist
- InstanceList containing sequence.segmentStartTags
- array of tags indicating the start of a segmentsegmentContinueTags
- array of tags indicating the continuation of a segmentpredictions
- list of Sequence
s that are the
predicted output of some Transducer
public SegmentIterator(Instance instance, java.lang.Object[] startTags, java.lang.Object[] inTags, Sequence prediction)
ilist
- InstanceList containing sequence.segmentStartTags
- array of tags indicating the start of a segmentsegmentContinueTags
- array of tags indicating the continuation of a segmentpredictions
- list of Sequence
s that are the
predicted output of some Transducer
public SegmentIterator(Sequence input, Sequence predicted, Sequence truth, java.lang.Object[] startTags, java.lang.Object[] inTags)
Method Detail |
---|
public Instance next()
next
in interface java.util.Iterator<Instance>
public Segment nextSegment()
public boolean hasNext()
hasNext
in interface java.util.Iterator<Instance>
public java.util.ArrayList toArrayList()
public void remove()
remove
in interface java.util.Iterator<Instance>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |