Does Praat have a membership operator (like Python "in")?

Earl Brown

In an interval tier I have hundreds of words, with each word delimited in a separate interval, but I'm interested in analyzing only some of them. In a TXT file on my hard drive, I have the list of words that I'm interested in analyzing. In a Praat script, I've loaded the TXT file list of words with "wds = Read Strings from raw text file: test_items_path$". Now, I'm looping over the intervals and would like to test whether the current interval label (word) is in the list of words I'm interested in analyzing.

Does Praat scripting have a membership operator, like Python and Julia "in", or R "%in%"? If not, how might I create a function in Praat scripting to create one? Or is there a better way to do this task (loop over intervals and stopping to analyze only some of the intervals, depending on whether the label of the current interval is in a list of desired words)?

Join to automatically receive all group messages.