Add suggester documentation in Exclusive_SpanCategorizer

This commit is contained in:
Lj Miranda 2023-01-17 10:34:21 +08:00
parent 52723db6c5
commit 26d5d637e3

View File

@ -141,6 +141,9 @@ class Exclusive_SpanCategorizer(SpanCategorizer):
"""Initialize the exclusive span categorizer.
vocab (Vocab): The shared vocabulary.
model (thinc.api.Model): The Thinc Model powering the pipeline component.
suggester (Callable[[Iterable[Doc], Optional[Ops]], Ragged]): A function that suggests spans.
Spans are returned as a ragged array with two integer columns, for the
start and end positions.
name (str): The component instance name, used to add entries to the
losses during training.
spans_key (str): Key of the Doc.spans dict to save the spans under.