Package 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 aSequence
segmented by aTransducer
, usually corresponding to some object extracted from an inputSequence
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(java.lang.Object o)
boolean
correct()
boolean
endsPrematurely()
boolean
equals(java.lang.Object o)
double
getConfidence()
int
getEnd()
Sequence
getInput()
java.lang.Object
getInTag()
Sequence
getPredicted()
java.lang.Object
getPredicted(int i)
Sequence
getSegmentInputSequence()
int
getStart()
java.lang.Object
getStartTag()
Sequence
getTruth()
java.lang.Object
getTruth(int i)
boolean
indexInSegment(int index)
java.lang.String
sequenceToString()
void
setConfidence(double c)
void
setCorrect(boolean b)
void
setPredicted(Sequence predicted)
int
size()
java.lang.String
toString()
-
-
-
Constructor Detail
-
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
-
-
Method Detail
-
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 interfacejava.lang.Comparable
-
sequenceToString
public java.lang.String sequenceToString()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-