Package cc.mallet.extract
Class LabeledSpan
- java.lang.Object
-
- cc.mallet.extract.LabeledSpan
-
- All Implemented Interfaces:
Span,java.io.Serializable
public class LabeledSpan extends java.lang.Object implements Span, java.io.Serializable
Created: Oct 12, 2004- Version:
- $Id: LabeledSpan.java,v 1.1 2007/10/22 21:37:44 mccallum Exp $
- Author:
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LabeledSpan(Span span, Label label, boolean isBackground)LabeledSpan(Span span, Label label, boolean isBackground, double confidence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetConfidence()java.lang.ObjectgetDocument()intgetEndIdx()Returns an integer index identifying the end of this span.LabelgetLabel()SpangetSpan()intgetStartIdx()Returns an integer index identifying the start of this span.java.lang.StringgetText()Returns a textual representatio of the span, suitable for XML output, e.g.Spanintersection(Span r)Returns a new span that is the intersection of this span and another.booleanintersects(Span r)booleanisBackground()booleanisSubspan(Span r)java.lang.StringtoString()
-
-
-
Method Detail
-
getSpan
public Span getSpan()
-
getLabel
public Label getLabel()
-
getText
public java.lang.String getText()
Description copied from interface:SpanReturns a textual representatio of the span, suitable for XML output, e.g.
-
getDocument
public java.lang.Object getDocument()
- Specified by:
getDocumentin interfaceSpan
-
getConfidence
public double getConfidence()
-
intersects
public boolean intersects(Span r)
- Specified by:
intersectsin interfaceSpan
-
intersection
public Span intersection(Span r)
Description copied from interface:SpanReturns a new span that is the intersection of this span and another.- Specified by:
intersectionin interfaceSpan
-
getEndIdx
public int getEndIdx()
Description copied from interface:SpanReturns an integer index identifying the end of this span. Beware that in some cases (e.g., for images), this may not correspond directly to a sequence index.
-
getStartIdx
public int getStartIdx()
Description copied from interface:SpanReturns an integer index identifying the start of this span. Beware that in some cases (e.g., for images), this may not correspond directly to a sequence index.- Specified by:
getStartIdxin interfaceSpan
-
isBackground
public boolean isBackground()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-