'Return the unicode encoding for the given corpus file, if known.
If the encoding is unknown, or if the given file should be
processed using byte strings (str), then return None.'

def encoding(self, file):

    if isinstance(self._encoding, dict):
        return self._encoding.get(file)
    else:
        return self._encoding
