def preprocess_train_data(self, training_data: TrainingData) -> RasaModelData:
    'Prepares data for training.\n\n        Performs sanity checks on training data, extracts encodings for labels.\n        '
    if self.component_config[BILOU_FLAG]:
        bilou_utils.apply_bilou_schema(training_data)
    label_id_index_mapping = self._label_id_index_mapping(training_data, attribute=INTENT)
    if (not label_id_index_mapping):
        return RasaModelData()
    self.index_label_id_mapping = self._invert_mapping(label_id_index_mapping)
    self._label_data = self._create_label_data(training_data, label_id_index_mapping, attribute=INTENT)
    self._entity_tag_specs = self._create_entity_tag_specs(training_data)
    label_attribute = (INTENT if self.component_config[INTENT_CLASSIFICATION] else None)
    model_data = self._create_model_data(training_data.nlu_examples, label_id_index_mapping, label_attribute=label_attribute)
    self._check_input_dimension_consistency(model_data)
    return model_data
Prepares data for training.

Performs sanity checks on training data, extracts encodings for labels.
def preprocess_train_data(self, training_data: TrainingData) -> RasaModelData:
    'Prepares data for training.\n\n        Performs sanity checks on training data, extracts encodings for labels.\n        '
    if self.component_config[BILOU_FLAG]:
        bilou_utils.apply_bilou_schema(training_data)
    label_id_index_mapping = self._label_id_index_mapping(training_data, attribute=INTENT)
    if (not label_id_index_mapping):
        return RasaModelData()
    self.index_label_id_mapping = self._invert_mapping(label_id_index_mapping)
    self._label_data = self._create_label_data(training_data, label_id_index_mapping, attribute=INTENT)
    self._entity_tag_specs = self._create_entity_tag_specs(training_data)
    label_attribute = (INTENT if self.component_config[INTENT_CLASSIFICATION] else None)
    model_data = self._create_model_data(training_data.nlu_examples, label_id_index_mapping, label_attribute=label_attribute)
    self._check_input_dimension_consistency(model_data)
    return model_data