'Trains the underlying pipeline by using the provided training data.'

def train(self, data):

    self.training_data = copy.deepcopy(data)
    context = {}
    for component in self.pipeline:
        updates = component.provide_context()
        if updates:
            context.update(updates)
    if (not self.skip_validation):
        components.validate_arguments(self.pipeline, context)
    for (i, component) in enumerate(self.pipeline):
        logger.info(u'Starting    to    train    component    {}'.format(component.name))
        component.prepare_partial_processing(self.pipeline[:i], context)
        updates = component.train(data, self.config, **context)
        logger.info(u'Finished    training    component.')
        if updates:
            context.update(updates)
    return Interpreter(self.pipeline, context)
