I want to add spancat using default model at the end of my pipeline as shown.
nlp = spacy.load("en_core_web_sm")
from spacy.pipeline.spancat import DEFAULT_SPANCAT_MODEL
config = {
"threshold": 0.5,
"spans_key": "labeled_spans",
"max_positive": None,
"model": DEFAULT_SPANCAT_MODEL,
"suggester": {"@misc": "spacy.ngram_suggester.v1", "sizes": [1, 2, 3]},
}
spancat = nlp.add_pipe("spancat", config=config)
optimizer = nlp.create_optimizer()
spancat.add_label("SPANCAT")
optimizer = nlp.initialise()
This gives me the following error
ValueError: [E955] Can't find table(s) lexeme_norm for language 'en' in spacy-lookups-data. Make sure you have the package installed or provide your own lookup tables if no default lookups are available for your language.
Why is this happening? I have read that for text categorizer training, you need to start with blank("en"), but I want to use "en_core_web_sm". What should I do? I want result as follows