ArneBinder / pytorch-ie

PyTorch-IE: State-of-the-art Information Extraction in PyTorch
MIT License
74 stars 8 forks source link

upgrade `LabeledSpanLengthCollector` to `SpanLengthCollector` #352

Closed ArneBinder closed 11 months ago

ArneBinder commented 11 months ago

This PR upgrades LabeledSpanLengthCollector to SpanLengthCollector:

IMPORTANT NOTE (similar to #351): Inferring labels produces wrong results for certain aggregation_functions such as min, mean, and std because documents with zero entries of a certain label are not considered anymore for that label. We remove these from aggregation_functions if labels == "INFERRED", but we can not handle any user defined function (which relies on correct zero values).