0

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?

4
  • 1
    This question appears to be off-topic because it is about implementation details of a particular software package, rather than linguistics. – jlawler Aug 1 '14 at 19:13
  • Similar questions have been allowed in the past: linguistics.stackexchange.com/questions/1790/… – lapropriu Aug 1 '14 at 19:28
  • Quite possibly. However, since there are lots of SEs with specific interests in individual software, I wonder whether it might be better answered on one of them. – jlawler Aug 1 '14 at 19:31
  • 1
    The way I see it, the question is specific to the Switchboard annotations, not to the NXT toolkit. I would expect more linguists to be familiar with Switchboard than programmers/computer scientists. – lapropriu Aug 1 '14 at 19:42
2

To get all orthography from non-terminals that dominate a WORD element, use the dominance operator; e.g.

($w word)($d da): ($d ^ $w) && ($w@orth ~ /the.*/)

or, if you prefer

($w word):($w@orth ~ /the.*/)::($d da): ($d ^ $w) 

From memory, I think we made this design choice as a compromise to keep orthography from the phonetic and orthographic transcription separate for some kinds of queries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.