diff --git a/spacy/pipeline/morphologizer.pyx b/spacy/pipeline/morphologizer.pyx index 305f8f5df..66e0787ef 100644 --- a/spacy/pipeline/morphologizer.pyx +++ b/spacy/pipeline/morphologizer.pyx @@ -67,9 +67,6 @@ class Morphologizer(Tagger): vocab: Vocab, model: Model, name: str = "morphologizer", - *, - labels_morph: Optional[dict] = None, - labels_pos: Optional[dict] = None, ): """Initialize a morphologizer. @@ -77,8 +74,6 @@ class Morphologizer(Tagger): model (thinc.api.Model): The Thinc Model powering the pipeline component. name (str): The component instance name, used to add entries to the losses during training. - labels_morph (dict): Mapping of morph + POS tags to morph labels. - labels_pos (dict): Mapping of morph + POS tags to POS tags. DOCS: https://nightly.spacy.io/api/morphologizer#init """ @@ -90,7 +85,7 @@ class Morphologizer(Tagger): # store mappings from morph+POS labels to token-level annotations: # 1) labels_morph stores a mapping from morph+POS->morph # 2) labels_pos stores a mapping from morph+POS->POS - cfg = {"labels_morph": labels_morph or {}, "labels_pos": labels_pos or {}} + cfg = {"labels_morph": {}, "labels_pos": {}} self.cfg = dict(sorted(cfg.items())) @property diff --git a/website/docs/api/morphologizer.md b/website/docs/api/morphologizer.md index d32514fb0..fed86ff5d 100644 --- a/website/docs/api/morphologizer.md +++ b/website/docs/api/morphologizer.md @@ -66,9 +66,6 @@ shortcut for this and instantiate the component using its string name and | `vocab` | The shared vocabulary. ~~Vocab~~ | | `model` | The [`Model`](https://thinc.ai/docs/api-model) powering the pipeline component. ~~Model[List[Doc], List[Floats2d]]~~ | | `name` | String name of the component instance. Used to add entries to the `losses` during training. ~~str~~ | -| _keyword-only_ | | -| `labels_morph` | Mapping of morph + POS tags to morph labels. ~~Dict[str, str]~~ | -| `labels_pos` | Mapping of morph + POS tags to POS tags. ~~Dict[str, str]~~ | ## Morphologizer.\_\_call\_\_ {#call tag="method"}