# uploading spacy model for ner.make-gold annotation

**URL:** <https://support.prodi.gy/t/uploading-spacy-model-for-ner-make-gold-annotation/1879>\
**Category:** Uncategorized\
**Tags:** usage, ner, spacy, solved\
**Created:** [August 8, 2019, 1:17pm UTC](https://support.prodi.gy/t/uploading-spacy-model-for-ner-make-gold-annotation/1879 "2019-08-08T13:17:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aslitoj](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/aslitoj/32/925_2.png) [@aslitoj](https://support.prodi.gy/u/aslitoj)\
**Post date:** [August 8, 2019, 1:17pm UTC](https://support.prodi.gy/t/uploading-spacy-model-for-ner-make-gold-annotation/1879/1 "2019-08-08T13:17:05Z")

</div>

Dear @ines and @honnibal,

I saw that some people had used the trained spacy model recursively for improving the accuracy of the NER tagging.

I trained an entity that is "SPORT" by using the spacy's train\_new\_entity\_type.py with an existing "en\_core\_web\_lg" model, and saved the output model for re-using it in the ner.make-gold. But when I run this command:  
prodigy ner.make-gold sport\_terms\_2 /../prodigy/spaCy/examples/training/model\_SPORT/ner/model ../raw\_data\_8\_8\_2019.jsonl --label "SPORT, ORG, GPE”  
it did not start the API for annotation. May be I try to import wrong output of the spacy.

Could you please tell me how can I import the spacy\_model that I obtained in order to use it for making gold data again?

Thanks,

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [August 8, 2019, 1:30pm UTC](https://support.prodi.gy/t/uploading-spacy-model-for-ner-make-gold-annotation/1879/2 "2019-08-08T13:30:24Z")

</div>

What do you mean by "did not start the API for annotation"? Did you get an error?

The command you run looks correct, but this potentially wrong:

> [@aslitoj](#):
>
> /../prodigy/spaCy/examples/training/model\_SPORT/ner/model

You'll need to load the _entire model directory_ you exported when you pre-trained the model. The same thing that spaCy expects for `spacy.load`. It should be the directory that has a `meta.json` in it, and a bunch of directories for the pipeline components. From your example, it looks like you might be trying to just load the `ner` subdirectory?

---

<div class="post-metadata">

**Author:** ![aslitoj](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/aslitoj/32/925_2.png) [@aslitoj](https://support.prodi.gy/u/aslitoj)\
**Post date:** [August 8, 2019, 1:48pm UTC](https://support.prodi.gy/t/uploading-spacy-model-for-ner-make-gold-annotation/1879/3 "2019-08-08T13:48:51Z")

</div>

> [@ines](#):
>
> What do you mean by "did not start the API for annotation"? Did you get an error?

I didn't get any error but I was waiting for a link to access the localhost:8080.  
Actually I only tried to import the model file inside the ner subdirectory.

So, I tried to import the output directory that I got from the spacy training as you said, but there is no error it just give me "\>" command line. I don't understand.

$ prodigy ner.make-gold sport\_terms\_2 /Users/asli/Desktop/NER/prodigy/spaCy/examples/training/model\_SPORT ../raw\_data\_8\_8\_2019.jsonl --label "SPORT, ORG, GPE”

> 

I want to use that model for annotating the new texts and make new annotations by using suggestions from the model so that I could use the new annotations for training spacy's train\_new\_entity\_type.py again.  
But, I guess ner.make-gold is not a method that suggests the entity from a given text, am I right? I would like to speed up annotation process for me since GPE and ORG entities are already in the pretrained model. So what do you suggest to me ?

I hope I am clear cause I am new to prodigy, and I get some difficulty to explain my problem with the syntactic language of the prodigy and spacy.

---

<div class="post-metadata">

**Author:** ![aslitoj](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/aslitoj/32/925_2.png) [@aslitoj](https://support.prodi.gy/u/aslitoj)\
**Post date:** [August 8, 2019, 2:16pm UTC](https://support.prodi.gy/t/uploading-spacy-model-for-ner-make-gold-annotation/1879/4 "2019-08-08T14:16:41Z")

</div>

When I tried that command:

> > > import spacy  
> > > spacy.load("/Users/asli/Desktop/NER/prodigy/spaCy/examples/training/model\_SPORT")  
> > > \<spacy.lang.en.English object at 0x10cb64320\>  
> > > It seems like working but I cannot upload this model with:  
> > > prodigy ner.make-gold sport\_terms\_2 "/Users/asli/Desktop/NER/prodigy/spaCy/examples/training/model\_SPORT" ../raw\_data\_8\_8\_2019.jsonl --label "SPORT, ORG, GPE”

I also checked the spaCy's [Saving, loading and distributing models](https://spacy.io/usage/saving-loading#models) but I didn't understand clearly. Could you please help me.

---

<div class="post-metadata">

**Author:** ![aslitoj](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/aslitoj/32/925_2.png) [@aslitoj](https://support.prodi.gy/u/aslitoj)\
**Post date:** [August 8, 2019, 2:25pm UTC](https://support.prodi.gy/t/uploading-spacy-model-for-ner-make-gold-annotation/1879/5 "2019-08-08T14:25:16Z")

</div>

I found my error. It's because of different type of double quote at the end of the labels. So it works now.
