Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
408 views
in Technique[技术] by (71.8m points)

python - add a parser from en model to my custom named entitiy reocognition model trained by spacy

I want to add a parser from en model to my custom ner model (which is trained on my data by spacy)

I used this

nlp_en = spacy.load('en_core_web_sm')  
path= '../data/ANarcV02c'
nlp_c=spacy.load(path)
parser = nlp_en.get_pipe("parser")
nlp_c.add_pipe( parser)

but it does not work

it says that i have

['ner', 'parser']

then when i want to use it says

KeyError: "[E018] Can't retrieve string for hash '12837356684637874264'. This usually refers to an issue with the `Vocab` or `StringStore`."

my spacy is 2.3.5 i have python 3.8


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...