From 992ee1c02f9ba06eba25f996b4f8c1367aa3f869 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 9 Aug 2020 15:09:31 +0200 Subject: [PATCH] Update tagger docstring --- spacy/pipeline/tagger.pyx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spacy/pipeline/tagger.pyx b/spacy/pipeline/tagger.pyx index aa0399b33..c5791213f 100644 --- a/spacy/pipeline/tagger.pyx +++ b/spacy/pipeline/tagger.pyx @@ -42,7 +42,14 @@ DEFAULT_TAGGER_MODEL = Config().from_str(default_model_config)["model"] scores=["tag_acc"], default_score_weights={"tag_acc": 1.0}, ) -def make_tagger(nlp: Language, name: str, model: Model): +def make_tagger(nlp: Language, name: str, model: Model[List[Doc], List[Floats2d]]): + """Construct a part-of-speech tagger component. + + model (Model[List[Doc], List[Floats2d]]): A model instance that predicts + the tag probabilities. The output vectors should match the number of tags + in size, and be normalized as probabilities (all scores between 0 and 1, + with the rows summing to 1). + """ return Tagger(nlp.vocab, model, name)