hbuschme / TextGridTools

Read, write, and manipulate Praat TextGrid files with Python
GNU General Public License v3.0
125 stars 30 forks source link

Minor difference in long textgrid output for point tiers #16

Closed YannickJadoul closed 5 years ago

YannickJadoul commented 5 years ago

This is a minor detail, but when comparing the long output from TextGridTools to Praat, I found a difference for point tiers:

[...]
        xmax = 1.283265306122449
        intervals: size = 6
        points [1]:
            number = 0.10218212453545583
            mark = "The"
[...]

while Praat has points: size = 6.

Reading it into Praat is fine, since Praat seems to skip over the rest of the text until it finds a number: see https://github.com/praat/praat/blob/master/sys/Collection.cpp#L98 or https://github.com/praat/praat/blob/master/sys/Collection.cpp#L134.

But it might become a potentially annoying mistake if things change in the future inside Praat.

The line in TextGridTools seems to be this one, being added for both IntervalTiers and PointTiers: https://github.com/hbuschme/TextGridTools/blob/master/tgt/io3.py#L268

hbuschme commented 5 years ago

Thanks for pointing this out to us, I've released version 1.4.5, which fixes the bug.

YannickJadoul commented 5 years ago

Wow, great; thank you! :-)