#This script counts the number of intervals in tiers assigned to #IPs, APs, and syllables, in a given TextGrid files. # #In this script, tier 6 is the interval with marked IP boundaries, #tier 5 is the one with marked AP boundaries, and tier 3 has marked #syllable boundaries. For accuracy, ensure that there is no silence #left at the beginning and the end of the sound file to which the #TextGrid corresponds, and make sure not to mark the beginning of #the first IP and AP or their ending point, or Praat will count #those as intervals too. # #You must have a TextGrid available in the object window #prior to running this script. # #Here I subtract 2 to each value because of the first and second #intervals of each tier (pauses before and after reading) # #Created by Jessica Sertling Miller - sertling@uiuc.edu #June 6, 2006 ######################################################################## select all grid$ = selected$ ("TextGrid") select TextGrid 'grid$' clearinfo sylln = Get number of intervals... 3 wordn = Get number of intervals... 4 apn = Get number of intervals... 5 ipn = Get number of intervals... 6 sylln2 = sylln - 2 wordn2 = wordn - 2 apn2 = apn - 2 ipn2 = ipn - 2 printline 'sylln2' 'wordn2' 'apn2' 'ipn2' select all Remove