Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

Conversation

@timjzee
Copy link

@timjzee timjzee commented Feb 3, 2019

Added a short argument to write functions of Tier and TextGrid classes. If short=True the tiers/textgrids are written in the abbreviated short format. Default value of short is set to False, so it should be backward compatible.

@kylebgorman
Copy link
Owner

Thanks for this.

I like the idea of adding support for this but repeatedly switching on a single constant boolean inside of a loop is IMO poor design. It should just be if short: ... else: at most one time. Would you be willing to refactor for that? (Or just call the method write_short and put it somewhere else.)

I don't use (or understand why anyone else would use) the short format, and we don't yet support its reading either, so this strikes me as a low priority.

@timjzee
Copy link
Author

timjzee commented Feb 3, 2019

Good point. Will implement write_short if I have some spare time. AFAIK the short format is mostly used for large corpora as it saves some space. I'm converting output from a forced aligner to short textgrids so I can more easily compare them to the short textgrids from some of those corpora.

As far as I can tell reading short TextGrids works just fine, btw.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants