Package cc.mallet.fst

Class Segment

  • All Implemented Interfaces:

    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 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.
        input - entire input sequence
        pred - predicted sequence
        start - starting position of extracted segment
        end - 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)
      • getPredicted

        public java.lang.Object getPredicted​(int i)
      • getPredicted

        public Sequence getPredicted()
      • setPredicted

        public void setPredicted​(Sequence predicted)
      • 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()
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        equals in class java.lang.Object