This commit is contained in:
kadarakos 2023-03-07 16:15:15 +00:00
parent 086bb7f544
commit efea793248

View File

@ -13,12 +13,12 @@ A span categorizer consists of two parts: a [suggester function](#suggesters)
that proposes candidate spans, which may or may not overlap, and a labeler model that proposes candidate spans, which may or may not overlap, and a labeler model
that predicts zero or more labels for each candidate. that predicts zero or more labels for each candidate.
This component comes in two forms: `spancat` and `spancat_singlelabel` (added in spaCy v3.5.1). When you This component comes in two forms: `spancat` and `spancat_singlelabel` (added in
need to perform multi-label classification on your spans, use `spancat`. The spaCy v3.5.1). When you need to perform multi-label classification on your
`spancat` component uses a `Logistic` layer where the output class probabilities spans, use `spancat`. The `spancat` component uses a `Logistic` layer where the
are independent for each class. However, if you need to predict at most one true output class probabilities are independent for each class. However, if you need
class for a span, then use `spancat_singlelabel`. to predict at most one true class for a span, then use `spancat_singlelabel`. It
It uses a `Softmax` layer and treats the task as a multi-class problem. uses a `Softmax` layer and treats the task as a multi-class problem.
Predicted spans will be saved in a [`SpanGroup`](/api/spangroup) on the doc. Predicted spans will be saved in a [`SpanGroup`](/api/spangroup) on the doc.
Individual span scores can be found in `spangroup.attrs["scores"]`. Individual span scores can be found in `spangroup.attrs["scores"]`.