Package ips.annot.textgrid
Class TextGridFileParser
- java.lang.Object
-
- ips.annot.textgrid.TextGridFileParser
-
public class TextGridFileParser extends java.lang.ObjectParser and exporter for Praat TextGrid annotation files. I could not find a TextGrid syntax documentation. The syntax is derived only from example TextGrid files.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTextGridFileParser.Property
-
Constructor Summary
Constructors Constructor Description TextGridFileParser(float sampleRate)Create parser.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetXmax(Level tier)doublegetXmin(Level tier)static voidmain(java.lang.String[] args)main method for test purposes.Bundleparse(java.io.File textGridFile, java.nio.charset.Charset charset)Parse TextGrid file.Bundleparse(java.io.Reader reader)Parse TxtGrid content from reader.voidwrite(Bundle bundle, java.io.Writer writer)
-
-
-
Method Detail
-
parse
public Bundle parse(java.io.File textGridFile, java.nio.charset.Charset charset) throws java.io.IOException
Parse TextGrid file.- Parameters:
textGridFile- TextGrid filecharset- encoding charset of the file- Returns:
- annotation object
- Throws:
java.io.IOException
-
parse
public Bundle parse(java.io.Reader reader) throws java.io.IOException
Parse TxtGrid content from reader.- Parameters:
reader- TextGrid input- Returns:
- annotation object
- Throws:
java.io.IOException
-
getXmin
public double getXmin(Level tier)
-
getXmax
public double getXmax(Level tier)
-
write
public void write(Bundle bundle, java.io.Writer writer) throws java.io.IOException
- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args)
main method for test purposes.
-
-