The name of the database to be searched, a string. This is the name of the database template without the .tpl extension.
A pattern which matches the utterance names to be searched, a string. An asterisk (*) matches one or more characters.
The search query, a string.
The Splus function emu.query is an interface to the command line program emuquery and the arguments have the same interpretation. The query is performed and the resulting segment or event list is read into Splus as an object of class emusegs which can be used to retrieve speech and other data via the emu.track function.
The database argument specifies the database to be searched and should be the name of the database template without the .tpl extension. As usual, the database template contains all of the information required for Emu to find the database files. For Emu to find the database template it should be in one of the locations described earlier.
The pattern argument gives a pattern to match the utterances to be searched. As with normal file patterns, an asterisk (*) matches any number of letters. To search all utterances in the database use a pattern of "*" (note the quotes around the pattern since this must be an Splus string). To match only those utterances beginning with sp1 use the pattern "sp1*".
The query argument specifies the database query which should follow the syntax described earlier. Again, this argument needs to be enclosed in quotes as it is an Splus string.
As a special case, if only the template argument is supplied to emu.query the gui interface to database queries is invoked. This interface allows you to construct and save utterance lists which are a more flexible way of specifying the utterances to be searched than the patterns available in emu.query.
The object returned by emu.query is an Emu segment or event list and has the Splus class emusegs. The object contains a record of the database that was queried, the query and the type of the results: segment or event. For each segment or event matching the search pattern there is one entry in the segment list giving the label, start time, end time and utterance name (events only have one time, their end time is set to zero).
The function summary can be used to give a table of the number of examples of each label in the segment list. mustart and muend extract the start and end times of the segments as a vector, mudur calculates the duration of each segment and returns a vector. utt extracts just the utterance name for each segment and label extracts just the labels.