from spacy.pipeline.span_finder import DEFAULT_SPAN_FINDER_MODEL import spacy config = { "threshold": 0.5, "spans_key": "my_spans", "max_length": None, "min_length": None, "model": DEFAULT_SPAN_FINDER_MODEL, } nlp = spacy.load("de_core_news_lg") doc = nlp("This is a sentence.") span_finder = nlp.add_pipe("span_finder", config=config)