'Initialize this mapping based on keyword arguments, as
follows:
- cat_pattern: A regular expression pattern used to find the
category for each file identifier.  The pattern will be
applied to each file identifier, and the first matching
group will be used as the category label for that file.
- cat_map: A dictionary, mapping from file identifiers to
category labels.
- cat_file: The name of a file that contains the mapping
from file identifiers to categories.  The argument
``cat_delimiter`` can be used to specify a delimiter.
The corresponding argument will be deleted from ``kwargs``.  If
more than one argument is specified, an exception will be
raised.'

def __init__(self, kwargs):

    self._f2c = None
    self._c2f = None
    self._pattern = None
    self._map = None
    self._file = None
    self._delimiter = None
    if (u'cat_pattern' in kwargs):
        self._pattern = kwargs[u'cat_pattern']
        del kwargs[u'cat_pattern']
    elif (u'cat_map' in kwargs):
        self._map = kwargs[u'cat_map']
        del kwargs[u'cat_map']
    elif (u'cat_file' in kwargs):
        self._file = kwargs[u'cat_file']
        del kwargs[u'cat_file']
        if (u'cat_delimiter' in kwargs):
            self._delimiter = kwargs[u'cat_delimiter']
            del kwargs[u'cat_delimiter']
    else:
        raise ValueError(u'Expected    keyword    argument    cat_pattern    or    cat_map    or    cat_file.')
    if ((u'cat_pattern' in kwargs) or (u'cat_map' in kwargs) or (u'cat_file' in kwargs)):
        raise ValueError(u'Specify    exactly    one    of:    cat_pattern,    cat_map,    cat_file.')
