Tidy a TEI classification response with raw scores
Source:R/hf_engine.R
tidy_tei_classification_response.RdWith raw_scores = TRUE, TEI returns logits. This function applies the
softmax in R. TEI sorts each text's labels by score, so labels are matched
by name, never by position. A missing or NaN score gives NA for that text.