File size: 364 Bytes
da88570
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)