question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spacy is not saving Models with new labels.

See original GitHub issue

I am using the examples from spacy’s documentation to add new entity labels.

I am loading the model like this :

def main(model=“en_core_web_md”, new_model_name=“sak_agreements”, output_dir=“./sak”)

and then using the example code from spacy’s site and update model with nlp.update functions. My models gets created and saved to the directory but when I run print(ent.label_, ent.text) it gives me no results.

The problem is the entire code as described on spacy’s website works just fine if I replace it with blank ‘en’ model.

I need to use both “en_core_web_md” models and my own saved models for custom NER lables.

Your Environment

  • Operating System: Windows.10.10
  • Python Version Used: 3.8.5
  • spaCy Version Used: 2.3.1
  • Environment Information: Models : en_core_web_md

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
phrulcommented, Dec 8, 2020

Thanks. This issues can be closed.

0reactions
github-actions[bot]commented, Oct 29, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Saving and Loading · spaCy Usage Documentation
spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more....
Read more >
How to save model in spacy for custom NER which is again ...
Let's say I have trained my model with label called "FRUIT" and saved it using nlp.to_disk("F:/Saved Models/FRUIT_pipeline").
Read more >
Extend Named Entity Recogniser (NER) to label new entities ...
This post assumes that the reader has some notion of entities extraction from texts and wants to further understand what state-of-the-art ...
Read more >
7. How to Train spaCy NER Model
You may need to gather more varied training data or you may need to reconsider your labels. Another possibility is that you need...
Read more >
Prodigy 101 – everything you need to know
Prodigy isn't “software as a service” – it's a tool that you can download, ... of a dataset to save the annotations to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found