ArneBinder / pytorch-ie-hydra-template-1

PyTorch-IE Hydra Template
8 stars 1 forks source link

brat serializer: allow using annotation ids from document metadata #172

Closed ArneBinder closed 2 months ago

ArneBinder commented 2 months ago

This PR adds the parameters metadata_gold_id_keys and metadata_prediction_id_keys to the BratSerializer:

Usage example:

+serializer.metadata_gold_id_keys.labeled_spans=entity_ids 

This will use the entries in entity_ids from the document metadata as IDs when serializing the gold annotations from the labeled_spans layer.