'Return a list of file identifiers for the files that make up
this corpus, or that make up the given category(s) if specified.'

def fileids(self, categories=None):

    if (categories is None):
        return super(CategorizedCorpusReader, self).fileids()
    elif isinstance(categories, string_types):
        if (self._f2c is None):
            self._init()
        if (categories in self._c2f):
            return sorted(self._c2f[categories])
        else:
            raise ValueError((u'Category    %s    not    found' % categories))
    else:
        if (self._f2c is None):
            self._init()
        return sorted(set.union(*[self._c2f[c] for c in categories]))
