nltk / nltk_contrib

NLTK Contrib
http://nltk.org/
Other
166 stars 137 forks source link

fix: ooTextFile should handle tabs in addition to spaces #32

Open kalvinchang opened 8 months ago

kalvinchang commented 8 months ago

Currently, TextGrid.tiers is empty when faced with a file with tabs instead of spaces, such as CORAAL's forced alignment http://lingtools.uoregon.edu/coraal/aligned/.

from textgrid import TextGrid
file = "data/coraal/aligned/DCB_MFA_2019.06.19/DCB_se1_ag1_f_01_1.TextGrid"
grid = TextGrid(open(file).read())
print(grid.tiers)

is empty