############################################################ # tone-checker01.praat # Written by Kyuchul Yoon (kyoon@ling.osu.edu) # The script reads in textgrids one by one and checks each tone label # If it finds tone labels containing ? (unspecified), it prints the filename and location of ? ############################################################ # Get the user input form Select files and parameters word fileToProcess_(only_extensions) lab word subFolderToProcess K-ToBI-TextGrid-YTN natural phonologyTier 2 natural phoneticsTier 3 word outFileExt problem endform # Read all filenames Create Strings as file list... fileList 'subFolderToProcess$'\*.'fileToProcess$' numFiles = Get number of strings pause 'numFiles' files identified. Continue? # Process each file for i to numFiles select Strings fileList strFileName$ = Get string... i Read from file... 'subFolderToProcess$'\'strFileName$' Rename... textgrid numPoints = Get number of points... phonologyTier for j to numPoints labPoint$ = Get label of point... phonologyTier j if index(labPoint$, "?") <> 0 fileappend 'subFolderToProcess$'.'outFileExt$' 'strFileName$''tab$'phonology'tab$''j''newline$' endif endfor numPoints2 = Get number of points... phoneticsTier for k to numPoints2 labPoint2$ = Get label of point... phoneticsTier k if index(labPoint2$, "?") <> 0 fileappend 'subFolderToProcess$'.'outFileExt$' 'strFileName$''tab$'phonetics'tab$''k''newline$' endif endfor select TextGrid textgrid Remove endfor select Strings fileList Remove ############ END OF SCRIPT ###############