The NXT query language includes the query function TEXT, which should return the textual content of the variable it applies to. In theory, Switchboard should support this. The file README.SWBD-QUERIES.TXT, which comes with the NXT Switchboard Annotations download, recommends using TEXT to query the orthography:
($w word): (TEXT($w) == "the")
This is how to query the orthography. Posix regular expressions work here, too.
($w word): (TEXT($w) ~/the.*/)
But this doesn't seem to work for word or phonword-type variables (works for phone-type variables though). There is no error message, just 0 results, so I'm guessing
TEXT($w) just doesn't return anything. I know I can get around this by accessing the orthography attribute directly (
$w@orth == ...), but this won't work for non-terminals. So if I want to access the entire text under a certain non-terminal (which could dominate a number of terminals), there's no straightforward way of doing this?