':return: A list of the utterance identifiers for all
utterances in this corpus, or for the given speaker, dialect
region, gender, sentence type, or sentence number, if
specified.'

def utteranceids(self, dialect=None, sex=None, spkrid=None, sent_type=None, sentid=None):

    if isinstance(dialect, string_types):
        dialect = [dialect]
    if isinstance(sex, string_types):
        sex = [sex]
    if isinstance(spkrid, string_types):
        spkrid = [spkrid]
    if isinstance(sent_type, string_types):
        sent_type = [sent_type]
    if isinstance(sentid, string_types):
        sentid = [sentid]
    utterances = self._utterances[:]
    if (dialect is not None):
        utterances = [u for u in utterances if (u[2] in dialect)]
    if (sex is not None):
        utterances = [u for u in utterances if (u[4] in sex)]
    if (spkrid is not None):
        utterances = [u for u in utterances if (u[:9] in spkrid)]
    if (sent_type is not None):
        utterances = [u for u in utterances if (u[11] in sent_type)]
    if (sentid is not None):
        utterances = [u for u in utterances if (u[10:] in spkrid)]
    return utterances
