# Pre Annotate Data with Pattern

**URL:** <https://support.prodi.gy/t/pre-annotate-data-with-pattern/5043>\
**Category:** Uncategorized\
**Tags:** ner\
**Created:** [December 8, 2021, 6:26am UTC](https://support.prodi.gy/t/pre-annotate-data-with-pattern/5043 "2021-12-08T06:26:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ta13](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@ta13](https://support.prodi.gy/u/ta13)\
**Post date:** [December 8, 2021, 6:26am UTC](https://support.prodi.gy/t/pre-annotate-data-with-pattern/5043/1 "2021-12-08T06:26:12Z")

</div>

I have some patterns and want to pre-annotate the dataset using the pattern. I know ner.manual will highlight the words and I can assert it as correct or wrong. But I don't want to check it manually. I want to set all the pre-highlighted text as correct and make it as trainable format and train it. What will be procedure then?

---

<div class="post-metadata">

**Author:** ![ljvmiranda921](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ljvmiranda921/32/3197_2.png) [@ljvmiranda921](https://support.prodi.gy/u/ljvmiranda921)\
**Post date:** [December 9, 2021, 2:12am UTC](https://support.prodi.gy/t/pre-annotate-data-with-pattern/5043/2 "2021-12-09T02:12:25Z")

</div>

Hi @ta13, welcome to Prodigy!

If you don't want to annotate, you can just use spaCy instead: use the [EntityRuler](https://spacy.io/api/entityruler) with your patterns, and save the annotated samples.

One that's done, you can either:

- Save it in [Prodigy's JSONL format](https://prodi.gy/docs/api-loaders), then import it into the database,
- [Add the `Doc`s into a `DocBin`](https://spacy.io/usage/saving-loading#docs) and save it in the `.spacy` format.

From those formats, you can already start training 🙂

---

<div class="post-metadata">

**Author:** ![ta13](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@ta13](https://support.prodi.gy/u/ta13)\
**Post date:** [December 9, 2021, 5:59am UTC](https://support.prodi.gy/t/pre-annotate-data-with-pattern/5043/3 "2021-12-09T05:59:15Z")

</div>

When I work with entity ruler, I found these error:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/1/110e15174974802939d88b5b24633ce17963ee9b.png)  
After using create\_pipe() though it's a built in component, I found this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/c/c301971a17c2a171669765d8de813f07fb8a7da1.png)  
What should I do?

---

<div class="post-metadata">

**Author:** ![SofieVL](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/sofievl/32/915_2.png) [@SofieVL](https://support.prodi.gy/u/SofieVL)\
**Post date:** [December 9, 2021, 8:43am UTC](https://support.prodi.gy/t/pre-annotate-data-with-pattern/5043/4 "2021-12-09T08:43:30Z")

</div>

This sounds like perhaps you're using spaCy v2? Could you upgrade to a more recent version of spaCy v3?
