# Store the annotation obtained by ner.manual and --patterns at once

**URL:** <https://support.prodi.gy/t/store-the-annotation-obtained-by-ner-manual-and-patterns-at-once/4350>\
**Category:** Uncategorized\
**Tags:** usage, ner, spacy, solved\
**Created:** [June 22, 2021, 11:52am UTC](https://support.prodi.gy/t/store-the-annotation-obtained-by-ner-manual-and-patterns-at-once/4350 "2021-06-22T11:52:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [June 23, 2021, 2:00am UTC](https://support.prodi.gy/t/store-the-annotation-obtained-by-ner-manual-and-patterns-at-once/4350/2 "2021-06-23T02:00:47Z")

</div>

Hi! In that case, you could just load the patterns with spaCy directly to label all matches automatically and then use that data to pretrain you model. My comment here explains how to do this:

> [@How to perform automatically NER annotation based on patterns?](https://support.prodi.gy/t/how-to-perform-automatically-ner-annotation-based-on-patterns/4284/2):
>
> Hi! In that case, you can just go directly via spaCy, for example, using the entity ruler: [https://spacy.io/usage/rule-based-matching#entityruler](https://spacy.io/usage/rule-based-matching#entityruler) It lets you add your patterns and will add all matches to the doc.ents, just like an entity recognizer. You can then use that nlp object to process your texts and extract the pattern-based NER annotations. In theory, you don't even have to go through Prodigy at all and you could just export the data and train with spaCy directly. But if you want to mi…

Using the `EntityRuler` has the advantage that it takes patterns in the same format as Prodigy and takes care of filtering out overlaps (which can theoretically occur with multiple patterns).

---

_[View the full topic](https://support.prodi.gy/t/store-the-annotation-obtained-by-ner-manual-and-patterns-at-once/4350)._
