def preprocess_feature_and_label(feature, label, opts):

    feature = make_context(feature, opts['lcxt'], opts['rcxt'])

    if label is not None:
        if opts.has_key('ignore-label'):
            ignore = opts['ignore-label']
            mask = numpy.array([x not in ignore for x in label])
            feature = feature[mask]
            label = label[mask]
        if opts.has_key('map-label'):
            map = opts['map-label']
            label = numpy.array([map.get(x, x) for x in label])

    return feature, label
Apply the options 'context', 'ignore-label', 'map-label' to the feature
dataset/ETHPy150Open yajiemiao/pdnn/io_func/__init__.py/preprocess_feature_and_label