crowsetta.formats.seq.textgrid.parse#
Functions for parsing TextGrid files.
Code for parsing TextGrids is adapted from several sources,
all under MIT license.
The main logic in
parse_fp()
is from <dopefishh/pympi>
which is perhaps the most concise
Python code I have found for parsing TextGrids.
However there are also good ideas in
kylebgorman/textgrid
(__getitem__ method) and
timmahrt/praatIO
(data classes, handling encoding).
For some documentation of the binary format see
Legisign/Praat-textgrids
and for a citable library with docs see
hbuschme/TextGridTools
but note that both of these have a GPL license.
Functions
Get next line from a text stream, search for a string that matches a float value, and return as a float. |
|
Get next line from a text stream, search for a string that matches an int value, and return as an int. |
|
Get next line from a text stream, search for a string as Praat writes them (with double quoting), and then return just that string. |
|
|
Parse a TextGrid file, loading it into a |
|
Parse a TextGrid file passed in as an open text stream, converting it to a |
|
Get next line from a text stream and search it for a regex pattern. |