inpro.annotation
Class Label

java.lang.Object
  extended by inpro.annotation.Label

public class Label
extends java.lang.Object


Field Summary
private  double end
           
private  java.lang.String label
           
static java.util.Set<java.lang.String> SILENCE
          set of predefined labels that are to be understood as silence
private  double start
           
private static java.util.List<java.util.regex.Pattern> tgPatterns
           
 
Constructor Summary
Label(double s, double e, java.lang.String l)
          construct a label from given start and end times, with the given label text
Label(Label l)
          construct a label from another label
Label(java.lang.String l)
          construct a label with start and end set to NaN
 
Method Summary
 double getDuration()
          in seconds
 double getEnd()
          in seconds
 java.lang.String getLabel()
          the label itself
 double getStart()
          in seconds
 boolean isSilence()
          whether the label appears to mark a silence
(package private) static Label newFromTextGridLines(java.util.List<java.lang.String> lines)
          factory for labels from textgrid lines
 java.lang.StringBuilder toMbrola()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SILENCE

public static final java.util.Set<java.lang.String> SILENCE
set of predefined labels that are to be understood as silence


start

private final double start

end

private final double end

label

private final java.lang.String label

tgPatterns

private static java.util.List<java.util.regex.Pattern> tgPatterns
Constructor Detail

Label

public Label(double s,
             double e,
             java.lang.String l)
construct a label from given start and end times, with the given label text


Label

public Label(java.lang.String l)
construct a label with start and end set to NaN


Label

public Label(Label l)
construct a label from another label

Method Detail

getStart

public double getStart()
in seconds


getEnd

public double getEnd()
in seconds


getDuration

public double getDuration()
in seconds


getLabel

public java.lang.String getLabel()
the label itself


isSilence

public boolean isSilence()
whether the label appears to mark a silence


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toMbrola

public java.lang.StringBuilder toMbrola()

newFromTextGridLines

static Label newFromTextGridLines(java.util.List<java.lang.String> lines)
                           throws java.io.IOException
factory for labels from textgrid lines

Throws:
java.io.IOException