From bd0562e609e51d8cb2c63d70e09c20d879a9e381 Mon Sep 17 00:00:00 2001 From: Lj Miranda Date: Tue, 29 Nov 2022 11:01:18 +0800 Subject: [PATCH] Use DEFAULT_EXCL_SPANCAT_MODEL I also renamed spancat_exclusive_default_config into spancat_excl_default_config because black does some not pretty formatting changes. --- spacy/pipeline/spancat_exclusive.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spacy/pipeline/spancat_exclusive.py b/spacy/pipeline/spancat_exclusive.py index adf3741c1..29f902072 100644 --- a/spacy/pipeline/spancat_exclusive.py +++ b/spacy/pipeline/spancat_exclusive.py @@ -13,7 +13,7 @@ from .spancat import spancat_score, Suggester from .spancat import SpanCategorizer -spancat_exclusive_default_config = """ +spancat_excl_default_config = """ [model] @architectures = "spacy.SpanCategorizer.v1" scorer = {"@layers": "Softmax.v2"} @@ -39,7 +39,7 @@ maxout_pieces = 3 depth = 4 """ -DEFAULT_SPANCAT_MODEL = Config().from_str(spancat_exclusive_default_config)["model"] +DEFAULT_EXCL_SPANCAT_MODEL = Config().from_str(spancat_excl_default_config)["model"] @Language.factory( @@ -47,7 +47,7 @@ DEFAULT_SPANCAT_MODEL = Config().from_str(spancat_exclusive_default_config)["mod assigns=["doc.spans"], default_config={ "spans_key": "sc", - "model": DEFAULT_SPANCAT_MODEL, + "model": DEFAULT_EXCL_SPANCAT_MODEL, "suggester": {"@misc": "spacy.ngram_suggester.v1", "sizes": [1, 2, 3]}, "scorer": {"@scorers": "spacy.spancat_scorer.v1"}, },