def _create_entity_tag_specs(self, training_data: TrainingData) -> List[EntityTagSpec]:
    'Create entity tag specifications with their respective tag id mappings.'
    _tag_specs = []
    for tag_name in POSSIBLE_TAGS:
        if self.component_config[BILOU_FLAG]:
            tag_id_index_mapping = bilou_utils.build_tag_id_dict(training_data, tag_name)
        else:
            tag_id_index_mapping = self._tag_id_index_mapping_for(tag_name, training_data)
        if tag_id_index_mapping:
            _tag_specs.append(EntityTagSpec(tag_name=tag_name, tags_to_ids=tag_id_index_mapping, ids_to_tags=self._invert_mapping(tag_id_index_mapping), num_tags=len(tag_id_index_mapping)))
    return _tag_specs
Create entity tag specifications with their respective tag id mappings.
def _create_entity_tag_specs(self, training_data: TrainingData) -> List[EntityTagSpec]:
    
    _tag_specs = []
    for tag_name in POSSIBLE_TAGS:
        if self.component_config[BILOU_FLAG]:
            tag_id_index_mapping = bilou_utils.build_tag_id_dict(training_data, tag_name)
        else:
            tag_id_index_mapping = self._tag_id_index_mapping_for(tag_name, training_data)
        if tag_id_index_mapping:
            _tag_specs.append(EntityTagSpec(tag_name=tag_name, tags_to_ids=tag_id_index_mapping, ids_to_tags=self._invert_mapping(tag_id_index_mapping), num_tags=len(tag_id_index_mapping)))
    return _tag_specs