cc.mallet.fst
Class Segment
java.lang.Object
cc.mallet.fst.Segment
- All Implemented Interfaces:
- java.lang.Comparable
public class Segment
- extends java.lang.Object
- implements java.lang.Comparable
Represents a labelled chunk of a Sequence
segmented by a
Transducer
, usually corresponding to some object extracted
from an input Sequence
.
Constructor Summary |
Segment(Sequence input,
Sequence pred,
Sequence truth,
int start,
int end,
java.lang.Object startTag,
java.lang.Object inTag)
Initializes the segment. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Segment
public Segment(Sequence input,
Sequence pred,
Sequence truth,
int start,
int end,
java.lang.Object startTag,
java.lang.Object inTag)
- Initializes the segment.
- Parameters:
input
- entire input sequencepred
- predicted sequencestart
- starting position of extracted segmentend
- ending position of extracted segment
setCorrect
public void setCorrect(boolean b)
size
public int size()
getTruth
public java.lang.Object getTruth(int i)
getTruth
public Sequence getTruth()
getPredicted
public java.lang.Object getPredicted(int i)
getPredicted
public Sequence getPredicted()
setPredicted
public void setPredicted(Sequence predicted)
getInput
public Sequence getInput()
getStart
public int getStart()
getEnd
public int getEnd()
getStartTag
public java.lang.Object getStartTag()
getInTag
public java.lang.Object getInTag()
getConfidence
public double getConfidence()
setConfidence
public void setConfidence(double c)
correct
public boolean correct()
endsPrematurely
public boolean endsPrematurely()
indexInSegment
public boolean indexInSegment(int index)
getSegmentInputSequence
public Sequence getSegmentInputSequence()
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interface java.lang.Comparable
sequenceToString
public java.lang.String sequenceToString()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object