diff --git a/spacy/pipeline/morphologizer.pyx b/spacy/pipeline/morphologizer.pyx index c9798a638..60ad10a2b 100644 --- a/spacy/pipeline/morphologizer.pyx +++ b/spacy/pipeline/morphologizer.pyx @@ -103,7 +103,7 @@ class Morphologizer(Tagger): @property def label_data(self) -> Dict[str, Dict[str, Union[str, float, int, None]]]: - """RETURNS (Dict): A dictionary with all labels data.""" + """A dictionary with all labels data.""" return {"morph": self.cfg["labels_morph"], "pos": self.cfg["labels_pos"]} def add_label(self, label): diff --git a/spacy/pipeline/tagger.pyx b/spacy/pipeline/tagger.pyx index f4e8ecebd..a4f9d395f 100644 --- a/spacy/pipeline/tagger.pyx +++ b/spacy/pipeline/tagger.pyx @@ -92,12 +92,7 @@ class Tagger(Pipe): @property def label_data(self): - """Data about the labels currently added to the component. - - RETURNS (Dict): The labels data. - - DOCS: https://nightly.spacy.io/api/tagger#labels - """ + """Data about the labels currently added to the component.""" return tuple(self.cfg["labels"]) def __call__(self, doc): diff --git a/spacy/pipeline/textcat.py b/spacy/pipeline/textcat.py index d6dafa3f5..776b0a178 100644 --- a/spacy/pipeline/textcat.py +++ b/spacy/pipeline/textcat.py @@ -161,10 +161,7 @@ class TextCategorizer(Pipe): @property def label_data(self) -> List[str]: - """RETURNS (List[str]): Information about the component's labels. - - DOCS: https://nightly.spacy.io/api/textcategorizer#labels - """ + """RETURNS (List[str]): Information about the component's labels.""" return self.labels def pipe(self, stream: Iterable[Doc], *, batch_size: int = 128) -> Iterator[Doc]: diff --git a/spacy/pipeline/transition_parser.pyx b/spacy/pipeline/transition_parser.pyx index 11e0e5af8..bcaa8e8d4 100644 --- a/spacy/pipeline/transition_parser.pyx +++ b/spacy/pipeline/transition_parser.pyx @@ -7,6 +7,7 @@ from libcpp.vector cimport vector from libc.string cimport memset from libc.stdlib cimport calloc, free import random +from typing import Optional import srsly from thinc.api import set_dropout_rate @@ -409,7 +410,7 @@ cdef class Parser(Pipe): def set_output(self, nO): self.model.attrs["resize_output"](self.model, nO) - def initialize(self, get_examples, *, nlp=None, labels=None): + def initialize(self, get_examples, nlp=None, labels=None): self._ensure_examples(get_examples) lexeme_norms = self.vocab.lookups.get_table("lexeme_norm", {}) if len(lexeme_norms) == 0 and self.vocab.lang in util.LEXEME_NORM_LANGS: