# Problems with CARDINAL NER after updating QUANTITY NER

**URL:** https://support.prodi.gy/t/problems-with-cardinal-ner-after-updating-quantity-ner/3721
**Category:** Uncategorized
**Tags:** usage, ner
**Created:** [December 10, 2020, 1:50pm UTC](https://support.prodi.gy/t/problems-with-cardinal-ner-after-updating-quantity-ner/3721 "2020-12-10T13:50:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![deanmalmgren](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/deanmalmgren/32/1763_2.png) [@deanmalmgren](https://support.prodi.gy/u/deanmalmgren)
#### Post date: [December 10, 2020, 1:50pm UTC](https://support.prodi.gy/t/problems-with-cardinal-ner-after-updating-quantity-ner/3721/1 "2020-12-10T13:50:24Z")

</div>

I used Prodigy to retrain the QUANTITY NER on en\_core\_web\_lg. With that updated model, it doesn't appear to be detecting CARDINAL anymore. Do I have to also train CARDINAL on the same dataset to retain that same NER capability?

Is there any reason why updating the QUANTITY NER would impact the CARDINAL NER?

Thanks for your help!

---

<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: [December 10, 2020, 10:36pm UTC](https://support.prodi.gy/t/problems-with-cardinal-ner-after-updating-quantity-ner/3721/2 "2020-12-10T22:36:25Z")

</div>

Hi! Since the numeric entities like `QUANTITY` and `CARDINAL` are similar, it can definitely happen that the model overcorrects when you only update it with only examples of one entity type. So in your case, it looks like the model has learned that most of what it previously predicted as `CARDINAL` are now `QUANTITY`.

This is also known as the "catastrophic forgetting" problem and you typically want to prevent this by including annotations of the new types **and** examples of what the model previously predicted correctly, essentially "reminding" it of what `CARDINAL` entities are. Doing this is pretty easy in Prodigy because you can just run a workflow like `ner.correct` with `--label CARDINAL`, accept all correctly predicted entities and add the annotations in with your `QUANTITY` dataset.

Here are some related discussions on the topic of catastrophic forgetting:

> [@New entity model ruins other entities](https://support.prodi.gy/t/new-entity-model-ruins-other-entities/179):
>
> I’m trying to train a new entity of type “Technology”. I started with some seed terms, created patterns and annotated ~300 examples. Then I batch-trained them with en\_core\_web\_lg as a baseline model. Although I don’t have a lot of annotations yet, I wanted to see how the model is doing so far. It seems that the model mislabels a lot of entities and tends to label non-entities as WORK\_OF\_ART: import spacy nlp = spacy.load('tech-model') doc = nlp('Blockchain is a kind of technology') [(ent.tex…

> [@Need more informations about catastrophic forgetting problem](https://support.prodi.gy/t/need-more-informations-about-catastrophic-forgetting-problem/453):
>
> Hello, I am trying to learn a new entity type and i have to say “catastrophic forgetting problem” is really a big problem for me . I have 2000 phrases in a txt file. Another file with 83 materials (my new entity). i am working with last version of prodigy (1.4.1) and spacy (2.0.10). Prodigy tool is clear for me now but i don’t really know how to use prodigy to avoid this behavior. I found a lot of post speaking about this problem but they can’t help me as i want. Particulary this one : [Ne…](https://support.prodi.gy/t/new-entity-model-ruins-other-entities/179)

> [@Catastrophic forgetting when training NER using Prodigy](https://support.prodi.gy/t/catastrophic-forgetting-when-training-ner-using-prodigy/2516):
>
> I'm creating several new custom entities based on a corpus with approximately 20K sentences. The corpus has a high percentage of several of the entities (PERSON, ORG, etc.) recognized by en\_core\_web\_lg, but there are a number of entities that are missing or poorly represented such as NORP, FAC, PRODUCT, EVENT, WORK\_OF\_ART. Prodigy NER training starting with the en\_core\_web\_lg model works great on my new entities and the well represented ones in my corpus. Although my corpus does not include sev…

---

<div class="post-metadata">

### Author: ![deanmalmgren](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/deanmalmgren/32/1763_2.png) [@deanmalmgren](https://support.prodi.gy/u/deanmalmgren)
#### Post date: [December 11, 2020, 11:13am UTC](https://support.prodi.gy/t/problems-with-cardinal-ner-after-updating-quantity-ner/3721/3 "2020-12-11T11:13:36Z")

</div>

Thank you for sharing. It's a good day when you get to learn something new 🙂
